Which exceptions are you catching when you don't specify an exception class like this:
begin
# do something
rescue
puts "Exception!"
end
According to my copy of Programming Ruby 1.9,
A rescue clause with no parameter is treated as if it had a parameter of
StandardError.
And here's the documentation from ruby-doc.org:
By default,
rescueonly interceptsStandardErrorand its descendants, but you can specify which exceptions you want handled, as arguments. (This technique does not work whenrescueis in statement-modifier position.)
The Why Not Wiki has the Exception hierarchy available if you need to reference it.
As a quick reference, the Exception classes that are not derived from StandardError are:
fatalNoMemoryErrorScriptErrorSignalExceptionSystemExitSystemStackError