diff options
author | Benoit Foucher <benoit@zeroc.com> | 2012-10-10 16:00:58 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2012-10-10 16:00:58 +0200 |
commit | 8bcfc9e4a8a1de3d72e30ffc6f3c9d72a8d3f0e4 (patch) | |
tree | 1cdcd88fccb57f88d2b47cd1757b4d43bc05be4b /cpp/src/slice2cpp/Gen.cpp | |
parent | Added IceGridGUI IceStorm metrics (diff) | |
download | ice-8bcfc9e4a8a1de3d72e30ffc6f3c9d72a8d3f0e4.tar.bz2 ice-8bcfc9e4a8a1de3d72e30ffc6f3c9d72a8d3f0e4.tar.xz ice-8bcfc9e4a8a1de3d72e30ffc6f3c9d72a8d3f0e4.zip |
Improved tracing of failures, user exceptions are now tracked
with a userException member.
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 72ac920e597..6738a68f10c 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -2263,8 +2263,10 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) // and Windows 64 bits when compiled with optimization (see bug 4400). // writeAllocateCode(C, ParamDeclList(), p, _useWstring | TypeContextAMIEnd); - - C << nl << "if(!__result->__wait())"; + C << nl << "bool __ok = __result->__wait();"; + C << nl << "try"; + C << sb; + C << nl << "if(!__ok)"; C << sb; C << nl << "try"; C << sb; @@ -2309,6 +2311,12 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) { C << nl << "return __ret;"; } + C << eb; + C << nl << "catch(const ::Ice::LocalException& ex)"; + C << sb; + C << nl << "__result->__getObserver().failed(ex.ice_name());"; + C << nl << "throw;"; + C << eb; } else { |