diff options
author | Marc Laukien <marc@zeroc.com> | 2001-07-16 12:20:39 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2001-07-16 12:20:39 +0000 |
commit | ffe772b6e9dcac3ea88e7564f240a2c92e2d9246 (patch) | |
tree | ac22f2a4b7d86c4edba228540c110f3813c765c5 /cpp | |
parent | more exception stuff (diff) | |
download | ice-ffe772b6e9dcac3ea88e7564f240a2c92e2d9246.tar.bz2 ice-ffe772b6e9dcac3ea88e7564f240a2c92e2d9246.tar.xz ice-ffe772b6e9dcac3ea88e7564f240a2c92e2d9246.zip |
more exception test stuff
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 10 | ||||
-rw-r--r-- | cpp/src/slice2cpp/GenUtil.cpp | 4 |
2 files changed, 11 insertions, 3 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index c6a14f2f392..39039124f68 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -1514,7 +1514,15 @@ Slice::Gen::ObjectVisitor::visitOperation(const Operation_ptr& p) C << nl << "catch(" << exceptionTypeToString(*r) << " __ex)"; C << sb; C << nl << "__os -> write(" << cnt++ << ");"; - writeMarshalUnmarshalCode(C, *r, "__ex", true); + if(Proxy_ptr::dynamicCast(*r)) + { + string s = "static_cast< "; + s += typeToString(*r); + s += ">(__ex)"; + writeMarshalUnmarshalCode(C, *r, s, true); + } + else + writeMarshalUnmarshalCode(C, *r, "__ex", true); C << nl << "return ::__Ice::DispatchException;"; C << eb; } diff --git a/cpp/src/slice2cpp/GenUtil.cpp b/cpp/src/slice2cpp/GenUtil.cpp index 42da4f6bbc8..b2fad506791 100644 --- a/cpp/src/slice2cpp/GenUtil.cpp +++ b/cpp/src/slice2cpp/GenUtil.cpp @@ -163,7 +163,7 @@ Slice::exceptionTypeToString(const Type_ptr& type) "const ::std::string&", "const ::std::wstring&", "const ::Ice::Object_ptrE&", - "const ::Ice::Object_prx&", + "const ::Ice::Object_prxE&", "const ::Ice::LocalObject_ptrE&" }; @@ -177,7 +177,7 @@ Slice::exceptionTypeToString(const Type_ptr& type) Proxy_ptr proxy = Proxy_ptr::dynamicCast(type); if(proxy) - return "const " + proxy -> _class() -> scoped() + "_prx&"; + return "const " + proxy -> _class() -> scoped() + "_prxE&"; Enum_ptr en = Enum_ptr::dynamicCast(type); if(en) |