1 def foo
 2     raise RuntimeError
 3 end
 4 
 5 Thread.new do
 6     begin
 7         foo
 8     rescue Exception
 9         puts $!, $!.backtrace
10     end
11 end