3 # $Release Version: 0.9$
5 # $Date: 2007-02-12 15:01:19 -0800 (Mon, 12 Feb 2007) $
6 # by Keiju ISHITSUKA(Nihon Rational Software Co.,Ltd)
17 extend Exception2MessageMapper
18 def_exception :FrameOverflow, "frame overflow"
19 def_exception :FrameUnderflow, "frame underflow"
25 @frames = [TOPLEVEL_BINDING] * INIT_STACK_TIMES
28 def trace_func(event, file, line, id, binding)
38 bind = @frames[-(n + CALL_STACK_OFFSET)]
39 Fail FrameUnderflow unless bind
45 Fail FrameOverflow unless bind
50 def Frame.bottom(n = 0)
59 eval "self", @backtrace.top
62 @backtrace = Frame.new
63 set_trace_func proc{|event, file, line, id, binding, klass|
64 @backtrace.trace_func(event, file, line, id, binding)