Class: Nydp::Builtin::HandleError
- Defined in:
- lib/nydp/builtin/handle_error.rb
Overview
require "nydp/vm"
Instance Method Summary collapse
Methods included from Helper
#cons, #list, #literal?, #pair?, #sig, #sym, #sym?
Methods included from Converter
Methods included from Base
#call, #handle_error, ignore_errors, #inspect, #name, #nydp_type, #to_s
Instance Method Details
#builtin_call(handler, tricky) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/nydp/builtin/handle_error.rb', line 6 def builtin_call handler, tricky begin res = tricky.call rescue Exception => e o = e msgs = [] traces = [] while e msgs << e. traces << Nydp.enhance_backtrace(e.backtrace) e = e.cause end res = handler.call msgs._nydp_wrapper, traces._nydp_wrapper end res._nydp_wrapper end |