From 3a388d0e462d9fb98b0d3badaeefa089bf9a486d Mon Sep 17 00:00:00 2001 From: Thomas Feuvrier <thomas.feuvrier@c-s.fr> Date: Wed, 14 Jan 2009 12:38:36 +0100 Subject: [PATCH] BUG: reportError was not used in InternalReadHeaderInformation metho of otb::MWImageIO class. Consequently, the CanRead method throw an exception for all over formats (tif, ...) --- Code/IO/otbMWImageIO.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Code/IO/otbMWImageIO.cxx b/Code/IO/otbMWImageIO.cxx index 868773dc51..acbee4fd41 100644 --- a/Code/IO/otbMWImageIO.cxx +++ b/Code/IO/otbMWImageIO.cxx @@ -213,7 +213,10 @@ bool MWImageIO::InternalReadHeaderInformation(std::fstream & file, const bool re } else { - itkExceptionMacro(<< "MW : impossible to determine CodePix information of the image"); + if( reportError == true ) + { + itkExceptionMacro(<< "MW : impossible to determine CodePix information of the image"); + } return false; } -- GitLab