[Fxruby-users] Re: catching exceptions in event handlers
Status: Inactive
Brought to you by:
lyle
From: Aaron S. <aa...@sc...> - 2003-07-23 13:58:48
|
At 15:40 +0100 23 Jul 2003, Emmanuel Touzery <emm...@wa...> wrote: > C:\programs\glossary\test>ruby test.rb > test.rb:38:in `onCmdOpen': undefined local variable or method `pouf' for > #<Gloss > aryMainWindow:0x52d3c78> (NameError) > from test.rb:61:in `run' > from test.rb:61 NameError exceptions don't get caught by a bare rescue since that's equivalent to "rescue StandardError". If you truly want to catch all exceptions you need to use "rescue Exception". -- Aaron Schrab aa...@sc... http://www.schrab.com/aaron/ [It is] best to confuse only one issue at a time. -- K&R |