diff options
author | Bernard Normier <bernard@zeroc.com> | 2007-11-26 14:53:59 -0500 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2007-11-26 14:53:59 -0500 |
commit | 781b07f5f0c07633510b645c0ba8aa7b43f80a59 (patch) | |
tree | 3d6cc9e07abd6fd696e018a08268b6b59a7ad8e7 /cpp/src/slice2java/Gen.cpp | |
parent | fix slice2cs definition (diff) | |
download | ice-781b07f5f0c07633510b645c0ba8aa7b43f80a59.tar.bz2 ice-781b07f5f0c07633510b645c0ba8aa7b43f80a59.tar.xz ice-781b07f5f0c07633510b645c0ba8aa7b43f80a59.zip |
Fixed SystemException to no longer derive from LocalException
Diffstat (limited to 'cpp/src/slice2java/Gen.cpp')
-rw-r--r-- | cpp/src/slice2java/Gen.cpp | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index dd285b1db1c..37fe9a2d6d8 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -4392,6 +4392,8 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p) out << eb; out << ";"; + out << nl << "try"; + out << sb; out << sp << nl << "Ice.DispatchStatus __status = __direct.servant().__collocDispatch(__direct);"; out << nl << "if(__status == Ice.DispatchStatus.DispatchUserException)"; out << sb; @@ -4404,6 +4406,12 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p) } out << eb; + out << nl << "finally"; + out << sb; + out << nl << "__direct.destroy();"; + out << eb; + + out << eb; for(ExceptionList::const_iterator t = throws.begin(); t != throws.end(); ++t) { string exS = getAbsolute(*t, package); @@ -4413,33 +4421,15 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p) out << eb; } - out << nl << "catch(java.lang.Throwable __ex)"; + out << nl << "catch(Ice.SystemException __ex)"; out << sb; - out << nl << "IceInternal.LocalExceptionWrapper.throwWrapper(__ex);"; + out << nl << "throw __ex;"; out << eb; - out << nl << "finally"; - out << sb; - out << nl << "if(__direct != null)"; - out << sb; - out << nl << "try"; - out << sb; - out << nl << "__direct.destroy();"; - out << eb; - for(ExceptionList::const_iterator k = throws.begin(); k != throws.end(); ++k) - { - string exS = getAbsolute(*k, package); - out << nl << "catch(" << exS << " __ex)"; - out << sb; - out << nl << "throw __ex;"; - out << eb; - } out << nl << "catch(java.lang.Throwable __ex)"; out << sb; out << nl << "IceInternal.LocalExceptionWrapper.throwWrapper(__ex);"; out << eb; - out << eb; - out << eb; } if(ret && !cl->hasMetaData("amd") && !op->hasMetaData("amd")) { |