Commit 8c828c81 authored by Roland Levillain's avatar Roland Levillain
Browse files

Display Milena fatal errors on std::cerr, not std::cout.

	* mln/io/pdf/load.hh,
	* mln/io/tiff/load.hh:
	Here.
parent 3124478b
2013-08-27 Roland Levillain <roland@lrde.epita.fr>
Display Milena fatal errors on std::cerr, not std::cout.
* mln/io/pdf/load.hh,
* mln/io/tiff/load.hh:
Here.
2013-08-27 Roland Levillain <roland@lrde.epita.fr>
 
Remove Milena debug code making side effects on streams.
......@@ -201,7 +201,7 @@ namespace mln
{
case poppler::image::format_invalid:
case poppler::image::format_mono:
std::cout << "Loading black and white pdf is not implemented!";
std::cerr << "Loading black and white pdf is not implemented!";
abort();
break;
case poppler::image::format_rgb24:
......@@ -225,7 +225,7 @@ namespace mln
poppler::page_renderer pr;
if (! pr.can_render())
{
std::cout << "PDF cannot be rendered! Make sure libpoppler is "
std::cerr << "PDF cannot be rendered! Make sure libpoppler is "
<< "compiled with a render backend." << std::endl;
abort();
}
......@@ -282,7 +282,7 @@ namespace mln
if (first_page < 0 || first_page > (pdf->pages() - 1)
|| last_page < 0 || last_page > (pdf->pages() - 1))
{
std::cout << "Error while loading PDF: page range is not correct!"
std::cerr << "Error while loading PDF: page range is not correct!"
<< std::endl;
abort();
}
......@@ -313,7 +313,7 @@ namespace mln
{
if (pages[i] < 0 || pages[i] > pdf->pages() - 1)
{
std::cout << "Error while loading PDF: selected page "
std::cerr << "Error while loading PDF: selected page "
<< pages[i] << " does not exist!" << std::endl;
abort();
}
......
// Copyright (C) 2009, 2012 EPITA Research and Development Laboratory
// Copyright (C) 2009, 2012, 2013 EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of Olena.
......@@ -156,7 +156,7 @@ namespace mln
uint16 data_size = bits_per_sample * samples_per_pixel;
if (data_size != 24 && data_size != 32)
{
std::cout << "Trying to load a non color TIFF "
std::cerr << "Trying to load a non color TIFF "
<< "image into a color Milena image." << std::endl;
abort();
}
......@@ -166,7 +166,7 @@ namespace mln
if (!TIFFReadRGBAImage(file, ima.ncols(), ima.nrows(), raster, 0))
{
std::cout << "Error while reading the image file. Is it corrupted?"
std::cerr << "Error while reading the image file. Is it corrupted?"
<< std::endl;
abort();
}
......@@ -231,7 +231,7 @@ namespace mln
TIFFGetField(file, TIFFTAG_SAMPLESPERPIXEL, &samples_per_pixel);
if (samples_per_pixel != 1)
{
std::cout << "Trying to load a non grayscale TIFF "
std::cerr << "Trying to load a non grayscale TIFF "
<< "image into a grayscale Milena image." << std::endl;
abort();
}
......@@ -241,7 +241,7 @@ namespace mln
if (!TIFFReadRGBAImage(file, ima.ncols(), ima.nrows(), raster, 0))
{
std::cout << "Error while reading the image file. Is it corrupted?"
std::cerr << "Error while reading the image file. Is it corrupted?"
<< std::endl;
abort();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment