summaryrefslogtreecommitdiff
path: root/java/src/IceInternal/LocalExceptionWrapper.java
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2007-11-05 23:43:07 +1000
committerMichi Henning <michi@zeroc.com>2007-11-05 23:43:07 +1000
commita2a5af41c5274fa7e254558841c1367d07a445d4 (patch)
treea7ede915600cc8dcb0df48c535bd602ec225e95c /java/src/IceInternal/LocalExceptionWrapper.java
parentFixed bug I introduced with the sequence mapping changes that caused (diff)
downloadice-a2a5af41c5274fa7e254558841c1367d07a445d4.tar.bz2
ice-a2a5af41c5274fa7e254558841c1367d07a445d4.tar.xz
ice-a2a5af41c5274fa7e254558841c1367d07a445d4.zip
Bug 2522 for C++ and Java.
Diffstat (limited to 'java/src/IceInternal/LocalExceptionWrapper.java')
-rw-r--r--java/src/IceInternal/LocalExceptionWrapper.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/java/src/IceInternal/LocalExceptionWrapper.java b/java/src/IceInternal/LocalExceptionWrapper.java
index 8c9fbf976c6..36d99f391b7 100644
--- a/java/src/IceInternal/LocalExceptionWrapper.java
+++ b/java/src/IceInternal/LocalExceptionWrapper.java
@@ -44,6 +44,41 @@ public class LocalExceptionWrapper extends Exception
return _retry;
}
+ public static void
+ throwUnknownWrapper(java.lang.Throwable ex) throws LocalExceptionWrapper
+ {
+ if(ex instanceof Ice.UserException)
+ {
+ throw new LocalExceptionWrapper(new Ice.UnknownUserException(ex.toString()), false);
+ }
+ if(ex instanceof Ice.LocalException)
+ {
+ /*
+ //
+ // Commented-out code makes local exceptions fully location transparent,
+ // but the Freeze evictor relies on them not being transparent.
+ //
+ if(ex instanceof Ice.UnknownException ||
+ ex instanceof Ice.ObjectNotExistException ||
+ ex instanceof Ice.OperationNotExistException ||
+ ex instanceof Ice.FacetNotExistException)
+ {
+ throw new LocalExceptionWrapper((Ice.LocalException)ex, false);
+ }
+ throw new LocalExceptionWrapper(new Ice.UnknownLocalException(ex.toString()), false);
+ */
+ throw new LocalExceptionWrapper((Ice.LocalException)ex, false);
+ }
+ /*
+ throw new LocalExceptionWrapper(new Ice.UnknownException(ex.toString()), false);
+ */
+
+ if(ex instanceof RuntimeException)
+ {
+ throw (RuntimeException)ex;
+ }
+ }
+
private Ice.LocalException _ex;
private boolean _retry;
}