]> Creatis software - FrontAlgorithms.git/blobdiff - appli/TempAirwaysAppli/TempAirwaysAppli.cxx
...
[FrontAlgorithms.git] / appli / TempAirwaysAppli / TempAirwaysAppli.cxx
index 9e3692d23b6d5548a0c48983ca68555725f29074..ff6eaeb2d7d49e1638dc791fac0e774d3de23d79 100644 (file)
@@ -121,8 +121,11 @@ int main( int argc, char* argv[] )
       {
         for(unsigned int i = 0; i < treeInfoVector.size(); ++ i){
           TreeInfo info = treeInfoVector[i];
-          std::string err = info.myWorkspace->Execute( "eb" );
-          if( err != "" )
+          try
+          {
+            info.myWorkspace->Execute( "eb" );
+          }
+          catch( itk::ExceptionObject& err )
           {
             std::cerr << "Error: " << err << std::endl;
             std::exit( 1 );