diff options
author | Mark Spruiell <mes@zeroc.com> | 2004-09-02 18:54:36 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2004-09-02 18:54:36 +0000 |
commit | c99fdbac4672a2702d10224c5f226a3ec84d08b4 (patch) | |
tree | cb96d59e3bf39bdfd4785c4969b155690f1e8c4c /py/modules/IcePy/Util.h | |
parent | first round of marshaling refactor (diff) | |
download | ice-c99fdbac4672a2702d10224c5f226a3ec84d08b4.tar.bz2 ice-c99fdbac4672a2702d10224c5f226a3ec84d08b4.tar.xz ice-c99fdbac4672a2702d10224c5f226a3ec84d08b4.zip |
moving Exception functions to Util
Diffstat (limited to 'py/modules/IcePy/Util.h')
-rw-r--r-- | py/modules/IcePy/Util.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/py/modules/IcePy/Util.h b/py/modules/IcePy/Util.h index 2844b5e68b2..b004b86916f 100644 --- a/py/modules/IcePy/Util.h +++ b/py/modules/IcePy/Util.h @@ -13,6 +13,7 @@ #include <Python.h> #include <Ice/BuiltinSequences.h> #include <Ice/Current.h> +#include <Ice/Exception.h> namespace IcePy { @@ -99,10 +100,36 @@ std::string scopedToName(const std::string&); std::string fixIdent(const std::string&); // -// Returns a borrowed reference to the Python type object corresponding to the given Python type name. +// Returns a borrowed reference to the Python type object corresponding +// to the given Python type name. // PyObject* lookupType(const std::string&); +// +// Returns the current Python exception. +// +PyObject* getPythonException(bool = true); + +// +// Creates an exception instance of the given type. +// +PyObject* createExceptionInstance(PyObject*); + +// +// Converts an Ice exception into a Python exception. +// +void setPythonException(const Ice::Exception&); + +// +// Converts a Python exception into an Ice exception and throws it. +// +void throwPythonException(PyObject* = NULL); + +// +// Handle the SystemExit exception. +// +void handleSystemExit(); + } #endif |