diff options
author | Joe George <joe@zeroc.com> | 2016-08-19 12:12:40 -0400 |
---|---|---|
committer | Joe George <joe@zeroc.com> | 2016-08-19 12:16:18 -0400 |
commit | 271ca3828ac9f3dc2c0ca31dd331a6fcc3f01b8f (patch) | |
tree | ebef88a4e8bf0144bf5722dd1d569a388b740e09 /python/modules/IcePy/Operation.cpp | |
parent | Renabled tests for C++11 mapping (diff) | |
download | ice-271ca3828ac9f3dc2c0ca31dd331a6fcc3f01b8f.tar.bz2 ice-271ca3828ac9f3dc2c0ca31dd331a6fcc3f01b8f.tar.xz ice-271ca3828ac9f3dc2c0ca31dd331a6fcc3f01b8f.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/modules/IcePy/Operation.cpp')
-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 72a5ddc12d8..ec2fa8713fd 100644 --- a/python/modules/IcePy/Operation.cpp +++ b/python/modules/IcePy/Operation.cpp @@ -1734,12 +1734,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 |