GNOME Bugzilla – Bug 567659
key snooper trap to exception handlers
Last modified: 2021-07-05 12:22:16 UTC
The key snooper functions installed by Gtk2->key_snooper_install could helpfully trap errors through the Glib->install_exception_handler funcs. The program below shows how an error in a snooper terminates the whole program. (A snooper of course is basically an event handler like widget event handlers, but encompassing all widgets, and on that basis will almost certainly want to continue the main loop.) use strict; use warnings; use Gtk2 '-init'; Glib->install_exception_handler (sub { print "exception trapped\n"; return 1; }); Gtk2->key_snooper_install (sub { print "key snooper runs\n"; die "now throw an error"; }); my $toplevel = Gtk2::Window->new ('toplevel'); $toplevel->add (Gtk2::Label->new('Press any key')); $toplevel->show_all; Gtk2->main;
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME?utf8=%E2%9C%93&filter=perl- Thank you for your understanding and your help.