If you must rescue Exception . . .
29
Oct/090
Oct/090
Sometimes you see Ruby code that rescue an exception at the top of the hierarchy:
rescue Exception => e
If you must do that, how about providing a means to control-C, by putting this in the method with the rescue:
trap("INT") do
puts "Terminating . . . "
return # or maybe exit
end
Comments (0)
Trackbacks (0) ( subscribe to comments on this post )
No comments yet.
Leave a comment
No trackbacks yet.
