After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 320163 - Gtk.initCheck which does not terminate the app if fails missing
Gtk.initCheck which does not terminate the app if fails missing
Status: VERIFIED FIXED
Product: java-gnome
Classification: Bindings
Component: GTK
mainline
Other All
: Normal enhancement
: ---
Assigned To: Ismael Juma
Ismael Juma
Depends on:
Blocks:
 
 
Reported: 2005-10-29 11:22 UTC by Bodo-Merle Sandor
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
add a Gtk.initCheck method (5.85 KB, patch)
2005-10-29 11:23 UTC, Bodo-Merle Sandor
needs-work Details | Review
add Gtk.initCheck method - second try, based on comments from Ismael Juma (6.91 KB, patch)
2005-11-06 13:20 UTC, Bodo-Merle Sandor
none Details | Review

Description Bodo-Merle Sandor 2005-10-29 11:22:01 UTC
Gtk.initCheck method gives the possibility to handle gtk init errors in form of
a java exception.
Comment 1 Bodo-Merle Sandor 2005-10-29 11:23:41 UTC
Created attachment 54042 [details] [review]
add a Gtk.initCheck method
Comment 2 Ismael Juma 2005-10-31 01:10:42 UTC
Thanks for the patch, but there are a couple of things that I believe could be
improved. First of all, I'd prefer to throw the exception in the java side of
the code. Exception handling in JNI is much more cumbersome and there's no need
to use it in this particular case.

I would also prefer if initCheck and init share some of the common code. Easiest
way to achieve this is to probably have a private helper method.
Comment 3 Ismael Juma 2005-10-31 01:13:51 UTC
In addition, the access modifier for the exception class cannot be private if we
are to throw the exception from the java side.
Comment 4 Bodo-Merle Sandor 2005-11-06 13:20:55 UTC
Created attachment 54385 [details] [review]
add Gtk.initCheck method - second try, based on comments from Ismael Juma
Comment 5 Ismael Juma 2005-11-26 13:24:56 UTC
Thanks for the patch. Committed to CVS HEAD.