summaryrefslogtreecommitdiff
path: root/py/modules/IcePy/Util.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2006-11-07 18:50:51 +0000
committerMark Spruiell <mes@zeroc.com>2006-11-07 18:50:51 +0000
commit3f65ac52773b0c18f0c56c060a67962e534b68c8 (patch)
treeb96e749264c1046fbdf90b281083aa17be1586ad /py/modules/IcePy/Util.cpp
parentprint exception (diff)
downloadice-3f65ac52773b0c18f0c56c060a67962e534b68c8.tar.bz2
ice-3f65ac52773b0c18f0c56c060a67962e534b68c8.tar.xz
ice-3f65ac52773b0c18f0c56c060a67962e534b68c8.zip
updating exception translation
Diffstat (limited to 'py/modules/IcePy/Util.cpp')
-rw-r--r--py/modules/IcePy/Util.cpp30
1 files changed, 26 insertions, 4 deletions
diff --git a/py/modules/IcePy/Util.cpp b/py/modules/IcePy/Util.cpp
index 5c372fc4f2d..ff7dc6e026b 100644
--- a/py/modules/IcePy/Util.cpp
+++ b/py/modules/IcePy/Util.cpp
@@ -543,10 +543,17 @@ convertLocalException(const Ice::LocalException& ex, PyObject* p)
m = PyString_FromString(const_cast<char*>(e.operation.c_str()));
PyObject_SetAttrString(p, STRCAST("operation"), m.get());
}
- catch(const Ice::SyscallException& e)
+ catch(const Ice::FileException& e)
{
- IcePy::PyObjectHandle m = PyInt_FromLong(e.error);
- PyObject_SetAttrString(p, STRCAST("error"), m.get());
+ IcePy::PyObjectHandle m = PyInt_FromLong(e.error);
+ PyObject_SetAttrString(p, STRCAST("error"), m.get());
+ m = PyString_FromString(const_cast<char*>(e.path.c_str()));
+ PyObject_SetAttrString(p, STRCAST("path"), m.get());
+ }
+ catch(const Ice::SyscallException& e) // This must appear after all subclasses of SyscallException.
+ {
+ IcePy::PyObjectHandle m = PyInt_FromLong(e.error);
+ PyObject_SetAttrString(p, STRCAST("error"), m.get());
}
catch(const Ice::DNSException& e)
{
@@ -598,7 +605,7 @@ convertLocalException(const Ice::LocalException& ex, PyObject* p)
m = PyString_FromString(const_cast<char*>(e.expectedType.c_str()));
PyObject_SetAttrString(p, STRCAST("expectedType"), m.get());
}
- catch(const Ice::MarshalException& e)
+ catch(const Ice::ProtocolException& e) // This must appear after all subclasses of ProtocolException.
{
IcePy::PyObjectHandle m = PyString_FromString(const_cast<char*>(e.reason.c_str()));
PyObject_SetAttrString(p, STRCAST("reason"), m.get());
@@ -629,6 +636,21 @@ convertLocalException(const Ice::LocalException& ex, PyObject* p)
IcePy::PyObjectHandle m = PyString_FromString(const_cast<char*>(e.operation.c_str()));
PyObject_SetAttrString(p, STRCAST("operation"), m.get());
}
+ catch(const Ice::FeatureNotSupportedException& e)
+ {
+ IcePy::PyObjectHandle m = PyString_FromString(const_cast<char*>(e.unsupportedFeature.c_str()));
+ PyObject_SetAttrString(p, STRCAST("unsupportedFeature"), m.get());
+ }
+ catch(const Ice::NotSetException& e)
+ {
+ IcePy::PyObjectHandle m = PyString_FromString(const_cast<char*>(e.key.c_str()));
+ PyObject_SetAttrString(p, STRCAST("key"), m.get());
+ }
+ catch(const Ice::SecurityException& e)
+ {
+ IcePy::PyObjectHandle m = PyString_FromString(const_cast<char*>(e.reason.c_str()));
+ PyObject_SetAttrString(p, STRCAST("reason"), m.get());
+ }
catch(const Ice::LocalException&)
{
//