From 38be7d804aa9fd784896b492f20017a5b292ee0d Mon Sep 17 00:00:00 2001 From: Michi Henning Date: Thu, 15 Nov 2007 12:34:24 +1000 Subject: Fixed bug in TestUtil.py that caused line numbers to be omitted from the stack trace under Mono when the a test failed. Ported servant locator exceptions. Fixed bug that caused the "unknown" member of unknown exception to not be initialized in some cases, and initialized to the wrong value in other cases. Added ice_name() to mapping for exceptions--without it, there was no way to get at the Slice type id of an exception, which was needed to set the "unknown" member correctly. --- cpp/src/slice2cpp/Gen.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cpp/src/slice2cpp/Gen.cpp') diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 7694559b5fd..a608a38648b 100755 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -2987,6 +2987,7 @@ Slice::Gen::DelegateDVisitor::visitOperation(const OperationPtr& p) C << sb; C << nl << "__direct.servant()->__collocDispatch(__direct);"; C << eb; +#if 0 C << nl << "catch(const ::std::exception& __ex)"; C << sb; C << nl << "__direct.destroy();"; @@ -2997,6 +2998,13 @@ Slice::Gen::DelegateDVisitor::visitOperation(const OperationPtr& p) C << nl << "__direct.destroy();"; C << nl << "throw ::Ice::UnknownException(__FILE__, __LINE__, \"unknown c++ exception\");"; C << eb; +#else + C << nl << "catch(...)"; + C << sb; + C << nl << "__direct.destroy();"; + C << nl << "throw;"; + C << eb; +#endif C << nl << "__direct.destroy();"; C << eb; for(ExceptionList::const_iterator k = throws.begin(); k != throws.end(); ++k) -- cgit v1.2.3