summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cs
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2007-11-26 14:53:59 -0500
committerBernard Normier <bernard@zeroc.com>2007-11-26 14:53:59 -0500
commit781b07f5f0c07633510b645c0ba8aa7b43f80a59 (patch)
tree3d6cc9e07abd6fd696e018a08268b6b59a7ad8e7 /cpp/src/slice2cs
parentfix slice2cs definition (diff)
downloadice-781b07f5f0c07633510b645c0ba8aa7b43f80a59.tar.bz2
ice-781b07f5f0c07633510b645c0ba8aa7b43f80a59.tar.xz
ice-781b07f5f0c07633510b645c0ba8aa7b43f80a59.zip
Fixed SystemException to no longer derive from LocalException
Diffstat (limited to 'cpp/src/slice2cs')
-rwxr-xr-xcpp/src/slice2cs/Gen.cpp31
1 files changed, 12 insertions, 19 deletions
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp
index dc23423563c..1192172a13e 100755
--- a/cpp/src/slice2cs/Gen.cpp
+++ b/cpp/src/slice2cs/Gen.cpp
@@ -4150,6 +4150,9 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << sb;
_out << nl << "direct__ = new IceInternal.Direct(current__, run__);";
+ _out << nl << "try";
+ _out << sb;
+
_out << nl << "Ice.DispatchStatus status__ = direct__.servant().collocDispatch__(direct__);";
if(!throws.empty())
{
@@ -4161,6 +4164,12 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << nl << "_System.Diagnostics.Debug.Assert(status__ == Ice.DispatchStatus.DispatchOK);";
_out << eb;
+ _out << nl << "finally";
+ _out << sb;
+ _out << nl << "direct__.destroy();";
+ _out << eb;
+ _out << eb;
+
for(ExceptionList::const_iterator i = throws.begin(); i != throws.end(); ++i)
{
_out << nl << "catch(" << fixId((*i)->scoped()) << ')';
@@ -4168,31 +4177,15 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << nl << "throw;";
_out << eb;
}
- _out << nl << "catch(System.Exception ex__)";
- _out << sb;
- _out << nl << "IceInternal.LocalExceptionWrapper.throwWrapper(ex__);";
- _out << eb;
- _out << nl << "finally";
- _out << sb;
- _out << nl << "if(direct__ != null)";
- _out << sb;
- _out << nl << "try";
+ _out << nl << "catch(Ice.SystemException)";
_out << sb;
- _out << nl << "direct__.destroy();";
+ _out << nl << "throw;";
_out << eb;
- for(ExceptionList::const_iterator j = throws.begin(); j != throws.end(); ++j)
- {
- _out << nl << "catch(" << fixId((*j)->scoped()) << " ex__)";
- _out << sb;
- _out << nl << "throw ex__;";
- _out << eb;
- }
_out << nl << "catch(System.Exception ex__)";
_out << sb;
_out << nl << "IceInternal.LocalExceptionWrapper.throwWrapper(ex__);";
_out << eb;
- _out << eb;
- _out << eb;
+
//
//
// Set out parameters