diff options
author | Marc Laukien <marc@zeroc.com> | 2001-10-14 16:20:03 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2001-10-14 16:20:03 +0000 |
commit | 909bb608a222169ac6dd3c4e88cfaf4f147e4cd7 (patch) | |
tree | b7af1a3cb0240a05a223b2fb8924fd362e950ffa /cpp/test/Ice/exceptions/TestI.cpp | |
parent | more exception cleanup (diff) | |
download | ice-909bb608a222169ac6dd3c4e88cfaf4f147e4cd7.tar.bz2 ice-909bb608a222169ac6dd3c4e88cfaf4f147e4cd7.tar.xz ice-909bb608a222169ac6dd3c4e88cfaf4f147e4cd7.zip |
more exception fixes
Diffstat (limited to 'cpp/test/Ice/exceptions/TestI.cpp')
-rw-r--r-- | cpp/test/Ice/exceptions/TestI.cpp | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/cpp/test/Ice/exceptions/TestI.cpp b/cpp/test/Ice/exceptions/TestI.cpp index c01cd66b7fa..c79a02e49e2 100644 --- a/cpp/test/Ice/exceptions/TestI.cpp +++ b/cpp/test/Ice/exceptions/TestI.cpp @@ -31,6 +31,23 @@ ThrowerI::throwAasA(Ice::Int a) } void +ThrowerI::throwAorDasAorD(Ice::Int a) +{ + if (a > 0) + { + A ex; + ex.a = a; + throw ex; + } + else + { + D ex; + ex.d = a; + throw ex; + } +} + +void ThrowerI::throwBasA(Ice::Int a, Ice::Int b) { throwBasB(a, b); @@ -66,3 +83,43 @@ ThrowerI::throwCasC(Ice::Int a, Ice::Int b, Ice::Int c) ex.c = c; throw ex; } + +void +ThrowerI::throwUndeclaredA(Ice::Int a) +{ + A ex; + ex.a = a; + throw ex; +} + +void +ThrowerI::throwUndeclaredB(Ice::Int a, Ice::Int b) +{ + B ex; + ex.a = a; + ex.b = b; + throw ex; +} + +void +ThrowerI::throwUndeclaredC(Ice::Int a, Ice::Int b, Ice::Int c) +{ + C ex; + ex.a = a; + ex.b = b; + ex.c = c; + throw ex; +} + +void +ThrowerI::throwLocalException() +{ + // Any local exception is fine... + throw Ice::TimeoutException(__FILE__, __LINE__); +} + +void +ThrowerI::throwNonIceException() +{ + throw int(); +} |