From dc41d828e8c1c9618514ff1c03dd51c087482e9c Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 9 Mar 2011 07:15:00 +0000 Subject: [PATCH] Fix a -Wreturn-type warning --- src/Session/SALOME_Session_Server.cxx | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/Session/SALOME_Session_Server.cxx b/src/Session/SALOME_Session_Server.cxx index 851557ce0..fbbf0c635 100755 --- a/src/Session/SALOME_Session_Server.cxx +++ b/src/Session/SALOME_Session_Server.cxx @@ -290,18 +290,16 @@ public: return myHandler ? myHandler->handle( receiver, e ) : TestApplication::notify( receiver, e ); #else - try - { - return myHandler ? myHandler->handle( receiver, e ) : QApplication::notify( receiver, e ); - } - catch(std::exception& e) - { - std::cerr << e.what() << std::endl; - } - catch(...) - { - std::cerr << "Unknown exception caught in Qt handler: it's probably a bug in SALOME platform" << std::endl; - } + try { + return myHandler ? myHandler->handle( receiver, e ) : QApplication::notify( receiver, e ); + } + catch (std::exception& e) { + std::cerr << e.what() << std::endl; + } + catch (...) { + std::cerr << "Unknown exception caught in Qt handler: it's probably a bug in SALOME platform" << std::endl; + } + return false; // return false when exception is caught #endif } SUIT_ExceptionHandler* handler() const { return myHandler; } -- 2.39.2