From 9406c648c5bb08ec048bee4d48976220cb3c47a4 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Tue, 5 Aug 2008 14:53:12 +0000 Subject: use new util function to throw exceptions --- bindings/java/lang.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bindings/java/lang.py') diff --git a/bindings/java/lang.py b/bindings/java/lang.py index 044e468e..e517ed21 100644 --- a/bindings/java/lang.py +++ b/bindings/java/lang.py @@ -568,7 +568,7 @@ protected static native void destroy(long cptr); print >> fd, ' if (gobj) {' print >> fd, ' %s;' % self.c_to_java_value ('ret','gobj->%s' % m[1], mtype, m[2]) print >> fd, ' } else {' - print >> fd, ' (*env)->ThrowNew(env, "java/lang/NullPointerException", "no gobject correspond to the given object");' + print >> fd, ' throw_by_name(env, "java/lang/NullPointerException", "no gobject correspond to the given object");' print >> fd, ' }' print >> fd, ' return ret;' print >> fd, '}' @@ -582,7 +582,7 @@ protected static native void destroy(long cptr); print >> fd, ' printf("%s_set %%p %%p\\n", gobj, value);' % prefix print >> fd, ' jobject_to_gobject(env, jobj, (GObject**)&gobj);' print >> fd, ' if (!gobj) {' - print >> fd, ' (*env)->ThrowNew(env, "java/lang/NullPointerException", "no gobject correspond to the given object");' + print >> fd, ' throw_by_name(env, "java/lang/NullPointerException", "no gobject correspond to the given object");' print >> fd, ' }' if not self.is_int_type(mtype) and not is_collection(mtype): print >> fd, ' if (gobj->%s) {' % m[1] -- cgit