Rescue

hello,

with this code
–8<—
rescue SyntaxError, NameError, StandardError => boom
print "\n\n Error: " + boom
$stdin.gets
exit
end
–8<—

I’m able to react on most of all errors.

Sometimes in Win$ the console-window will be killed after
a short time (with the error). How to avoid this to see the error?

daniel

Hi,

···

In message “rescue…” on 03/02/27, “daniel” offstuff@aon.at writes:

with this code
–8<—
rescue SyntaxError, NameError, StandardError => boom
print "\n\n Error: " + boom
$stdin.gets
exit
end
–8<—

I’m able to react on most of all errors.

Sometimes in Win$ the console-window will be killed after
a short time (with the error). How to avoid this to see the error?

I’m not sure what’s your problem, but

rescue Exception => boom

must be much better to catch all errors.

						matz.

Yukihiro Matsumoto matz@ruby-lang.org schrieb in im Newsbeitrag:
1046340484.043991.1489.nullmailer@picachu.netlab.jp…

Hi,

Sometimes in Win$ the console-window will be killed after
a short time (with the error

the error disappear with the console-window… ;-(

[…]
rescue Exception => boom
[…]

that’s fine, thx!

daniel

···

In message “rescue…” > on 03/02/27, “daniel” offstuff@aon.at writes: