diff options
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 64f06ac81a9..b8d889059b3 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -3236,8 +3236,9 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) C << nl << "*p = " << scope << name << "Ptr::dynamicCast(v);"; C << nl << "if(v && !*p)"; C << sb; - C << nl << "::Ice::NoObjectFactoryException e(__FILE__, __LINE__);"; - C << nl << "e.type = " << scope << fixKwd(name) << "::ice_staticId();"; + C << nl << "::Ice::UnexpectedObjectException e(__FILE__, __LINE__);"; + C << nl << "e.type = v->ice_id();"; + C << nl << "e.expectedType = " << scope << fixKwd(name) << "::ice_staticId();"; C << nl << "throw e;"; C << eb; C << eb; |