diff options
author | Benoit Foucher <benoit@zeroc.com> | 2002-10-23 14:19:11 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2002-10-23 14:19:11 +0000 |
commit | 0ebe4a1631811f30e253248c0e37433447355b08 (patch) | |
tree | e87c68ed7fda7dacad469c4cd82a14c800c5c01c /cpp/src | |
parent | Fixed ice_print message for database exceptions (diff) | |
download | ice-0ebe4a1631811f30e253248c0e37433447355b08.tar.bz2 ice-0ebe4a1631811f30e253248c0e37433447355b08.tar.xz ice-0ebe4a1631811f30e253248c0e37433447355b08.zip |
Added exception handler for Ice::Exception
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/Application.cpp | 2 | ||||
-rw-r--r-- | cpp/src/Ice/Incoming.cpp | 21 |
2 files changed, 22 insertions, 1 deletions
diff --git a/cpp/src/Ice/Application.cpp b/cpp/src/Ice/Application.cpp index e2073a3ee8d..b4f42e425c7 100644 --- a/cpp/src/Ice/Application.cpp +++ b/cpp/src/Ice/Application.cpp @@ -286,7 +286,7 @@ Ice::Application::releaseInterrupt() sigdelset(&sigset, SIGHUP); sigdelset(&sigset, SIGINT); sigdelset(&sigset, SIGTERM); - sigprocmask(SIG_BLOCK, &sigset, 0); + sigprocmask(SIG_SETMASK, &sigset, 0); } #endif diff --git a/cpp/src/Ice/Incoming.cpp b/cpp/src/Ice/Incoming.cpp index 0e35443abc0..ee943cec549 100644 --- a/cpp/src/Ice/Incoming.cpp +++ b/cpp/src/Ice/Incoming.cpp @@ -233,6 +233,27 @@ IceInternal::Incoming::invoke(bool response) return; } + catch(const Exception& ex) + { + if(locator && servant) + { + locator->finished(_current, servant, cookie); + } + + _is.endReadEncaps(); + + if(response) + { + _os.endWriteEncaps(); + _os.b.resize(statusPos); + _os.write(static_cast<Byte>(DispatchUnknownException)); + ostringstream str; + str << ex; + _os.write(str.str()); + } + + return; + } catch(const std::exception& ex) { if(locator && servant) |