From: Joel VanderWerf Date: 2007-07-09T10:07:41+09:00 Subject: set_trace_func and exceptions There seem to be two problems with set_trace_func (or things I don't understand): 1. The following program does not print "done". It does not raise an exception. It *does* set the program's return code to false. set_trace_func proc { || } puts "done" It's not a correct program, but I expected an ArgumentError, rather than a silent exit. 2. The following program does not print the exception or "done". It does not raise an exception to the top level. It *does* set the program's return code to false. set_trace_func proc { |event, file, line, id, binding, classname| raise "foobar" } begin x = 1 rescue => ex p ex end puts "done" Is it impossible to safely raise an exception inside of a trace func? This is in ruby 1.8.4 and 1.8.6. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407