From: "Hal E. Fulton" Date: 2003-07-03T08:39:26+09:00 Subject: Re: More error backtrace ----- Original Message ----- From: "Tom Clarke" To: "ruby-talk ML" Sent: Wednesday, July 02, 2003 6:00 PM Subject: Re: More error backtrace > I've been wondering for some time why it did this. > > Just curious, what's the rationale for truncating it? I always assumed it was to save space. Does it do it when the levels are unique? I've personally only seen it when there's a recursion problem and thus a stack overflow. In a case like that, there's no loss of information. Hal -- Hal Fulton hal9000@hypermetrics.com > -Tom > > On Wed, 2003-07-02 at 17:57, Brian Candler wrote: > > On Thu, Jul 03, 2003 at 06:43:03AM +0900, Nigel Gilbert wrote: > > > What I need to know are which lines of code are represented by "... 6 > > > levels...". Is there any way of stopping ruby from abbreviating the > > > backtrace like this? > > > > in eval.c: > > > > #define TRACE_MAX (TRACE_HEAD+TRACE_TAIL+5) > > #define TRACE_HEAD 8 > > #define TRACE_TAIL 5 > > > > So you could change those constants. But easier, wrap your code in something > > like this: > > > > begin > > ... do your code > > rescue Exception => e > > puts "#{e} (#{e.class})\n#{e.backtrace.join("\n")}" > > end > > > > Regards, > > > > Brian. > > > > > >