[fxruby-users] FXRuby default error handler
Joel VanderWerf
vjoel at path.berkeley.edu
Tue Oct 9 13:36:17 EDT 2007
Lyle Johnson wrote:
> On Oct 9, 2007, at 9:51 AM, Philippe Lang wrote:
>
>> Lyle, do you think it would be possible to add this feature to the
>> FXApp
>> class: the ability to register some sort of "rescue handler", that can
>> intercept in the "run" method the exceptions that would otherwise
>> crash
>> the application? For compatitility, the default handler could simply
>> raise the exception again, which is what the framework is doing now.
>
> If you will file a bug report (or feature request) about it, I'll
> consider it. I know that it's sometimes difficult to work around
> FOX's error handling mechanisms, since Jeroen just calls exit() on
> most errors; but particular circumstance may not be affected by that.
I don't think Philippe is talking about those kinds of situations (that
cause Fox to call exit()), but rather situations where ruby callback
raises a ruby exception, and it propagates outside of the #run call.
Is there any reason why the following code won't work?
begin
app.run
rescue => ex
if ... # ex can be retried
retry
end
end
app.exit
--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
More information about the fxruby-users
mailing list