Revision
4165
Author
martinlagardette@apple.com
Date
2010-05-26 14:53:53 -0700 (Wed, 26 May 2010)

Log Message

Set an empty backtrace for Obj-C exceptions so that IRB doesn't quit

Modified Paths

Diff

Modified: MacRuby/trunk/lib/irb/formatter.rb (4164 => 4165)


--- MacRuby/trunk/lib/irb/formatter.rb	2010-05-26 20:30:35 UTC (rev 4164)
+++ MacRuby/trunk/lib/irb/formatter.rb	2010-05-26 21:53:53 UTC (rev 4165)
@@ -47,6 +47,7 @@
     end
     
     def exception(exception)
+      exception.set_backtrace([]) if exception.backtrace.nil? 
       backtrace = $DEBUG ? exception.backtrace : filter_backtrace(exception.backtrace)
       "#{exception.class.name}: #{exception.message}\n\t#{backtrace.join("\n\t")}"
     end