summaryrefslogtreecommitdiff
path: root/cpp/src/slice2java/Gen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2java/Gen.cpp')
-rw-r--r--cpp/src/slice2java/Gen.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index 3d46e6f2d64..f7128687ac4 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -1793,7 +1793,14 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
out << eb;
out << nl << "catch (IceInternal.NonRepeatable __ex)";
out << sb;
- out << nl << "__rethrowException(__ex.get());";
+ if (op->nonmutating())
+ {
+ out << nl << "__cnt = __handleException(__ex.get(), __cnt);";
+ }
+ else
+ {
+ out << nl << "__rethrowException(__ex.get());";
+ }
out << eb;
out << nl << "catch (Ice.LocalException __ex)";
out << sb;