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 567659 - key snooper trap to exception handlers
key snooper trap to exception handlers
Status: RESOLVED OBSOLETE
Product: gnome-perl
Classification: Bindings
Component: Gtk2
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk2-perl-bugs
gtk2-perl-bugs
Depends on: 568460
Blocks:
 
 
Reported: 2009-01-13 21:37 UTC by Kevin Ryde
Modified: 2021-07-05 12:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kevin Ryde 2009-01-13 21:37:54 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;
Comment 1 GNOME Infrastructure Team 2021-07-05 12:22:16 UTC
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.