diff options
author | James Henstridge <james@daa.com.au> | 2003-07-24 15:06:08 +0000 |
---|---|---|
committer | James Henstridge <jamesh@src.gnome.org> | 2003-07-24 15:06:08 +0000 |
commit | 509bdda1a0db371fccb1d3b8e11a90c8040aaaf9 (patch) | |
tree | 8c0801159e4bf2d57ac9f6d7338e524609245052 /gobject | |
parent | 51c69a99945ad3d8f76414e59d6992fe1cae6fcb (diff) | |
download | pygtk-509bdda1a0db371fccb1d3b8e11a90c8040aaaf9.tar.gz |
same here.
2003-07-24 James Henstridge <james@daa.com.au>
* gtk/pygtk.h (init_pygtk): same here.
* pygobject.h (init_pygobject): convert fatal errors to normal
exceptions.
* gtk/gtkglmodule.c (initgl): same here.
* gtk/libglademodule.c (initglade): same here.
* gtk/gtkmodule.c (init_gtk): same here.
* atkmodule.c (initatk): same here.
* pangomodule.c (initpango): same here.
* gobjectmodule.c (initgobject): don't cause fatal errors if an
exception on init.
* codegen/codegen.py (write_source): print an error message if it
isn't possible to import a particular name from the module.
* autogen.sh (DIE): require Automake 1.7.
* configure.in (AC_ARG_ENABLE): enable thread support by default.
Diffstat (limited to 'gobject')
-rw-r--r-- | gobject/gobjectmodule.c | 5 | ||||
-rw-r--r-- | gobject/pygobject.h | 6 |
2 files changed, 4 insertions, 7 deletions
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c index e5165bd2..74216295 100644 --- a/gobject/gobjectmodule.c +++ b/gobject/gobjectmodule.c @@ -2075,9 +2075,4 @@ initgobject(void) PyModule_AddObject(m, "TYPE_PARAM", pyg_type_wrapper_new(G_TYPE_PARAM)); PyModule_AddObject(m, "TYPE_OBJECT", pyg_type_wrapper_new(G_TYPE_OBJECT)); PyModule_AddObject(m, "TYPE_PYOBJECT", pyg_type_wrapper_new(PY_TYPE_OBJECT)); - - if (PyErr_Occurred()) { - PyErr_Print(); - Py_FatalError("can't initialise module gobject"); - } } diff --git a/gobject/pygobject.h b/gobject/pygobject.h index 2c769d67..62c4cd2f 100644 --- a/gobject/pygobject.h +++ b/gobject/pygobject.h @@ -151,11 +151,13 @@ struct _PyGObject_Functions *_PyGObject_API; if (PyCObject_Check(cobject)) \ _PyGObject_API = (struct _PyGObject_Functions *)PyCObject_AsVoidPtr(cobject); \ else { \ - Py_FatalError("could not find _PyGObject_API object"); \ + PyErr_SetString(PyExc_RuntimeError, \ + "could not find _PyGObject_API object"); \ return; \ } \ } else { \ - Py_FatalError("could not import gobject"); \ + PyErr_SetString(PyExc_ImportError, \ + "could not import gobject"); \ return; \ } \ } |