diff options
author | Bernard Normier <bernard@zeroc.com> | 2017-01-19 16:21:07 -0500 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2017-01-19 16:21:07 -0500 |
commit | a7a1e11a3d1f32e71ea24596fec6645ecd669419 (patch) | |
tree | e8b365a2fb897023965b2a26f7385c56bfb7d242 /java-compat | |
parent | Fixed cross-testing objective-c/python (diff) | |
download | ice-a7a1e11a3d1f32e71ea24596fec6645ecd669419.tar.bz2 ice-a7a1e11a3d1f32e71ea24596fec6645ecd669419.tar.xz ice-a7a1e11a3d1f32e71ea24596fec6645ecd669419.zip |
java:UserException metadata for both local and remote operations
Diffstat (limited to 'java-compat')
4 files changed, 9 insertions, 7 deletions
diff --git a/java-compat/test/src/main/java/test/Ice/exceptions/AMDThrowerI.java b/java-compat/test/src/main/java/test/Ice/exceptions/AMDThrowerI.java index 1b7066269a2..801b0c57d00 100644 --- a/java-compat/test/src/main/java/test/Ice/exceptions/AMDThrowerI.java +++ b/java-compat/test/src/main/java/test/Ice/exceptions/AMDThrowerI.java @@ -176,12 +176,14 @@ public final class AMDThrowerI extends _ThrowerDisp @Override public void throwUndeclaredC_async(AMD_Thrower_throwUndeclaredC cb, int a, int b, int c, Ice.Current current) + throws Ice.UserException { C ex = new C(); ex.aMem = a; ex.bMem = b; ex.cMem = c; - cb.ice_exception(ex); + throw ex; + // cb.ice_exception(ex); } @Override diff --git a/java-compat/test/src/main/java/test/Ice/exceptions/Test.ice b/java-compat/test/src/main/java/test/Ice/exceptions/Test.ice index c9146df6eee..061e697657a 100644 --- a/java-compat/test/src/main/java/test/Ice/exceptions/Test.ice +++ b/java-compat/test/src/main/java/test/Ice/exceptions/Test.ice @@ -53,11 +53,11 @@ interface Thrower void throwCasA(int a, int b, int c) throws A; void throwBasB(int a, int b) throws B; void throwCasB(int a, int b, int c) throws B; - void throwCasC(int a, int b, int c) throws C; + ["java:UserException"] void throwCasC(int a, int b, int c) throws C; void throwUndeclaredA(int a); void throwUndeclaredB(int a, int b); - void throwUndeclaredC(int a, int b, int c); + ["java:UserException"] void throwUndeclaredC(int a, int b, int c); void throwLocalException(); void throwNonIceException(); void throwAssertException(); diff --git a/java-compat/test/src/main/java/test/Ice/exceptions/TestAMD.ice b/java-compat/test/src/main/java/test/Ice/exceptions/TestAMD.ice index d03c7ed7aba..6acec3f7361 100644 --- a/java-compat/test/src/main/java/test/Ice/exceptions/TestAMD.ice +++ b/java-compat/test/src/main/java/test/Ice/exceptions/TestAMD.ice @@ -49,10 +49,10 @@ exception D void throwCasA(int a, int b, int c) throws A; void throwBasB(int a, int b) throws B; void throwCasB(int a, int b, int c) throws B; - void throwCasC(int a, int b, int c) throws C; + ["java:UserException"] void throwCasC(int a, int b, int c) throws C; void throwUndeclaredA(int a); void throwUndeclaredB(int a, int b); - void throwUndeclaredC(int a, int b, int c); + ["java:UserException"] void throwUndeclaredC(int a, int b, int c); void throwLocalException(); void throwNonIceException(); void throwAssertException(); diff --git a/java-compat/test/src/main/java/test/Ice/exceptions/ThrowerI.java b/java-compat/test/src/main/java/test/Ice/exceptions/ThrowerI.java index ead93773148..b8c88eb3ad2 100644 --- a/java-compat/test/src/main/java/test/Ice/exceptions/ThrowerI.java +++ b/java-compat/test/src/main/java/test/Ice/exceptions/ThrowerI.java @@ -139,9 +139,9 @@ public final class ThrowerI extends _ThrowerDisp @Override public void throwUndeclaredC(int a, int b, int c, Ice.Current current) + throws Ice.UserException { - // Not possible in Java. - throw new Ice.UnknownUserException(); + throw new C(a, b, c); } @Override |