4 ms·
When using the debugger you can sometimes end up in an exception handler that doesn't provide a way to get access to said exception. $! can be a life-saver to h
by damncabbage 14y ago
When using the debugger you can sometimes end up in an exception handler that doesn't provide a way to get access to said exception. $! can be a life-saver to help figure out what's going on, eg.
(rdb:1) list
11 do_something_stupid
12 rescue
=> 13 log("Something went wrong")
14 end
(rdb:2) e $!
#<Errno::ENOENT: No such file or directory - /tmp/durr>