From 1ccc4e385fbd5d5786f740970357867f16ed4f56 Mon Sep 17 00:00:00 2001 From: Julien Michel <julien.michel@cnes.fr> Date: Mon, 2 May 2016 17:33:23 +0200 Subject: [PATCH] COMP: Fixing coverity issue 1350186 (uncaught std::runtime_exception) --- Modules/Visualization/IceViewer/src/otbIce.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Modules/Visualization/IceViewer/src/otbIce.cxx b/Modules/Visualization/IceViewer/src/otbIce.cxx index 8d4f808e81..6d3ec67a94 100644 --- a/Modules/Visualization/IceViewer/src/otbIce.cxx +++ b/Modules/Visualization/IceViewer/src/otbIce.cxx @@ -83,6 +83,11 @@ int main(int argc, char * argv[]) std::cerr << "Could not open file " << argv[i] << " as an image or a vector, skipping." << std::endl; } } + catch(std::runtime_error & err) + { + std::cerr<<"Runtime error: "<< err.what() <<std::endl; + return EXIT_FAILURE; + } } std::cout<<"Press F1 for help"<<std::endl; -- GitLab