Skip to content
Snippets Groups Projects
Commit 0176b7bf authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

BUG: Gestion correctes des exceptions pour le command line parser.

parent 78da9a78
No related branches found
No related tags found
No related merge requests found
...@@ -27,7 +27,15 @@ int main(int argc, char* argv[] ) ...@@ -27,7 +27,15 @@ int main(int argc, char* argv[] )
} }
catch( itk::ExceptionObject & err ) 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; return EXIT_FAILURE;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment