diff options
author | Joe George <joe@zeroc.com> | 2016-08-19 12:12:40 -0400 |
---|---|---|
committer | Joe George <joe@zeroc.com> | 2016-08-23 14:39:51 -0400 |
commit | 60725f7115273b5d44e0852641487075ceef8d7e (patch) | |
tree | ade8d6a3caba1eb042cb2f3a4567b0c248e52fc9 /python | |
parent | Fix PHP path in TestUtil (diff) | |
download | ice-60725f7115273b5d44e0852641487075ceef8d7e.tar.bz2 ice-60725f7115273b5d44e0852641487075ceef8d7e.tar.xz ice-60725f7115273b5d44e0852641487075ceef8d7e.zip |
Fix ICE-7278
Fix Python issue where Ice::UnknownUserException would sometimes be raised in C++
extension instead of being passed to Python.
Diffstat (limited to 'python')
-rw-r--r-- | python/modules/IcePy/Operation.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/python/modules/IcePy/Operation.cpp b/python/modules/IcePy/Operation.cpp index 47dab4af475..088c145ba52 100644 --- a/python/modules/IcePy/Operation.cpp +++ b/python/modules/IcePy/Operation.cpp @@ -1744,12 +1744,26 @@ IcePy::TypedInvocation::unmarshalException(const pair<const Ice::Byte*, const Ic } else { - PyException pye(ex); // No traceback information available. - pye.raise(); + try + { + PyException pye(ex); // No traceback information available. + pye.raise(); + } + catch(const Ice::UnknownUserException& uue) + { + return convertException(uue); + } } } - throw Ice::UnknownUserException(__FILE__, __LINE__, "unknown exception"); + // + // Getting here should be impossible: we can get here only if the + // sender has marshaled a sequence of type IDs, none of which we + // have a factory for. This means that sender and receiver disagree + // about the Slice definitions they use. + // + Ice::UnknownUserException uue(__FILE__, __LINE__, "unknown exception"); + return convertException(uue); #ifdef __SUNPRO_CC return 0; #endif |