News for hackers. Stuff that matters.
Re:Cryptic Ruby Global Variables and Their Meanings by damncabbage on Monday September 17, 2012 @06:37AM (#4531945)
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>

There are no comments on this comment yet.