Re: Exceptions disappear when thrown in callback

From: Date: Thu, 16 Mar 2006 07:12:57 +0000
Subject: Re: Exceptions disappear when thrown in callback
References: 1 2 3  Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-2632@lists.php.net to get a copy of this message
Correct, you can only catch exceptions if you place catch() { .. } around Gtk::main(). Alternatively, I could possibly allow you to use set_exception_handler() to provide custom handler.. -Andrei On Mar 15, 2006, at 10:21 PM, Christian Weiske wrote:
Andrei,
I can make it work (show exception in the console), but before I do that.. what are you trying to achieve by throwing an exception in the callback? Where are you going to catch it? Or do you just want to terminate the program?
I use the exception as a way to tell that an (mostly unfixable) error occured. So either, it should just terminate the program unless catched. The catch should IMO be around the Gtk::main() command, as that's the only position where it's working. --Regards/MfG, Christian Weiske


« previous php.gtk.dev (#2632) next »