From 0176b7bf8a3c10a5d92c0d752a7337e029b6caf3 Mon Sep 17 00:00:00 2001 From: Emmanuel Christophe <emmanuel.christophe@orfeo-toolbox.org> Date: Wed, 20 Aug 2008 16:56:22 +0000 Subject: [PATCH] BUG: Gestion correctes des exceptions pour le command line parser. --- Utils/otbConcatenateImages.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Utils/otbConcatenateImages.cxx b/Utils/otbConcatenateImages.cxx index ab8094954f..7a507b1f71 100755 --- a/Utils/otbConcatenateImages.cxx +++ b/Utils/otbConcatenateImages.cxx @@ -27,7 +27,15 @@ int main(int argc, char* argv[] ) } catch( itk::ExceptionObject & err ) { - std::cerr << err << std::endl; + std::string descriptionException = err.GetDescription(); + if(descriptionException.find("ParseCommandLine(): Help Parser") != std::string::npos) + { + return EXIT_SUCCESS; + } + if(descriptionException.find("ParseCommandLine(): Version Parser") != std::string::npos) + { + return EXIT_SUCCESS; + } return EXIT_FAILURE; } -- GitLab