diff options
author | Mark Spruiell <mes@zeroc.com> | 2012-06-13 16:19:58 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2012-06-13 16:19:58 -0700 |
commit | f1f199b777e32d0ff2a566af6eaa363d391aa18e (patch) | |
tree | 4cf8e91f33967c24f2369319585057df222503f7 /java/src/IceInternal/Ex.java | |
parent | Fixed support unknown types in unknown optionals (diff) | |
download | ice-f1f199b777e32d0ff2a566af6eaa363d391aa18e.tar.bz2 ice-f1f199b777e32d0ff2a566af6eaa363d391aa18e.tar.xz ice-f1f199b777e32d0ff2a566af6eaa363d391aa18e.zip |
* Minor C++ fixes
* Adding UnknownSlicedObject in Java
Diffstat (limited to 'java/src/IceInternal/Ex.java')
-rw-r--r-- | java/src/IceInternal/Ex.java | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/java/src/IceInternal/Ex.java b/java/src/IceInternal/Ex.java index dc22ab17893..91b1a981fec 100644 --- a/java/src/IceInternal/Ex.java +++ b/java/src/IceInternal/Ex.java @@ -11,11 +11,22 @@ package IceInternal; public class Ex { - public static void throwUOE(String expectedType, String actualType) + public static void throwUOE(String expectedType, Ice.Object v) { - throw new Ice.UnexpectedObjectException( - "expected element of type `" + expectedType + "' but received '" + actualType, - actualType, expectedType); + // + // If the object is an unknown sliced object, we didn't find an + // object factory, in this case raise a NoObjectFactoryException + // instead. + // + if(v instanceof Ice.UnknownSlicedObject) + { + Ice.UnknownSlicedObject uso = (Ice.UnknownSlicedObject)v; + throw new Ice.NoObjectFactoryException("", uso.getUnknownTypeId()); + } + + String type = v.ice_id(); + throw new Ice.UnexpectedObjectException("expected element of type `" + expectedType + "' but received '" + + type, type, expectedType); } public static void throwMemoryLimitException(int requested, int maximum) |