summaryrefslogtreecommitdiff
path: root/java/src/IceInternal/Ex.java
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2012-06-13 16:19:58 -0700
committerMark Spruiell <mes@zeroc.com>2012-06-13 16:19:58 -0700
commitf1f199b777e32d0ff2a566af6eaa363d391aa18e (patch)
tree4cf8e91f33967c24f2369319585057df222503f7 /java/src/IceInternal/Ex.java
parentFixed support unknown types in unknown optionals (diff)
downloadice-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.java19
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)