Re: [Newbie]: $buffer troubles
- From: "Ross McFarland" <rwmcfa1 neces com>
- To: gtk-perl-list gnome org
- Subject: Re: [Newbie]: $buffer troubles
- Date: Tue, 1 Feb 2005 09:14:23 -0500 (EST)
Vincent LADEUIL said:
"Thierry" == Thierry Vignaud <tvignaud mandrakesoft com> writes:
    >> I obtain this runtime error message:
    >>
    >> *** unhandled exception in callback: *** Usage:
    >> get_start_iter(buffer) at ./main.pl line 128.  ***
    >> ignoring at ./main.pl line 109.
    >>
    >> Can anyone tell me where's my error?
    Thierry> the usual design choice i usually complain about,
    Thierry> aka gtk2-perl just silently ignores exceptions in
    Thierry> callbacks
But as the error message  begins with '*** unhandled exception in
callback:', it may  mean that it is possible  to catch exceptions
and that only unhandled  exceptions are... unhandled. And I would
not say silently neither  since we are precisely discussing about
the message issued.
i originally didn't like the warn on errors stuff either, but i haven't come
to think that it was without much question the best route.
as was discussed way back when the original discussion came to a close the
following will achieve the other desired behavior (dying on all errors.)
  Glib->install_exception_handler (sub {
                warn shift;
                exit;
        });
so there's really no point in complaining about the choice. if you don't like
it all it takes is 4 lines of code and it won't work that way.
an example showing the behavior:
******************************************
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use Glib;
Glib->install_exception_handler (sub {
                warn shift;
                exit;
        });
my $loop = Glib::MainLoop->new;
Glib::Timeout->add (1000, sub {
                $loop->foo_bar;
                1;
        });
$loop->run;
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]