[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

exception trap in key snooper callback



I had an error in some key snooper callback code and hoped it might trap
to the installed "exception_handler" instead of aborting the program.
Is there a reason the "GPerlClosure" and "GPerlCallback" stuff differ in
that trapping?

use strict;
use warnings;
use Gtk2 '-init';

my $toplevel = Gtk2::Window->new ('toplevel');
$toplevel->show_all;

Glib->install_exception_handler (sub {
                                   print "exception handler\n";
                                 });
Gtk2->key_snooper_install (sub { print "snooper\n";
                                 die "snooper error\n";
                               });

Gtk2->main;
print "exit 0\n";
exit 0;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]