3 # $Release Version: 0.9$
5 # by Keiju ISHITSUKA(Nihon Rational Software Co.,Ltd)
16 extend Exception2MessageMapper
17 def_exception :FrameOverflow, "frame overflow"
18 def_exception :FrameUnderflow, "frame underflow"
24 @frames = [TOPLEVEL_BINDING] * INIT_STACK_TIMES
27 def trace_func(event, file, line, id, binding)
37 bind = @frames[-(n + CALL_STACK_OFFSET)]
38 Fail FrameUnderflow unless bind
44 Fail FrameOverflow unless bind
49 def Frame.bottom(n = 0)
58 eval "self", @backtrace.top
61 @backtrace = Frame.new
62 set_trace_func proc{|event, file, line, id, binding, klass|
63 @backtrace.trace_func(event, file, line, id, binding)