Closed neilconway closed 12 years ago
This has changed in the new runtime.
The new idiom is to only add information to the string part of the message, but to preserve the original backtrace.
e.g. in bud.eval_rules:
rescue Exception => e
err_msg = "** Exception while wiring rule: #{rule.src}\n ****** #{e}"
# Create a new exception for accomodating err_msg, but reuse original backtrace
new_e = (e.class <= Bud::Error) ? e.class.new(err_msg) : Bud::Error.new(err_msg)
new_e.set_backtrace(e.backtrace)
raise new_e
end
Thanks! I think this is resolved.
The stack trace we currently get out of Bud usually points at the place in
stratum_fixpoint
where we catch and reraise the exception, not the original site of the exception.