Length of backtrace displayed by ruby

S

Sylvain Joyeux

Is there a way to remove the maximum backtrace length displayed by the
interpreter when an exception terminates the process ? It makes the backtrace
totally useless in situations where it is long *and* the interesting calls
are in the middle.

Thanks

Sylvain
 
Y

Yukihiro Matsumoto

Hi,

In message "Re: Length of backtrace displayed by ruby"

|Is there a way to remove the maximum backtrace length displayed by the
|interpreter when an exception terminates the process ? It makes the backtrace
|totally useless in situations where it is long *and* the interesting calls
|are in the middle.

Not yet. Do you (or anybody else) have any good API suggestion?

matz.
 
A

ara.t.howard

Hi,

In message "Re: Length of backtrace displayed by ruby"

|Is there a way to remove the maximum backtrace length displayed by the
|interpreter when an exception terminates the process ? It makes the backtrace
|totally useless in situations where it is long *and* the interesting calls
|are in the middle.

Not yet. Do you (or anybody else) have any good API suggestion?

matz.

Exception.backtrace_display_limit = 42

??

-a
 
J

Jim Weirich

Sylvain said:
Is there a way to remove the maximum backtrace length displayed by the
interpreter when an exception terminates the process ? It makes the
backtrace
totally useless in situations where it is long *and* the interesting
calls
are in the middle.

IIRC, this only happens when the exception is handled by the top level
interpreter. If you catch the exception yourself at the top level you
can print out whatever you want, including the full stack trace.
 
S

Stephen Kellett

In message said:
Exception.backtrace_display_limit = 42

Exception.setFilter(regularExpression)

where the matching items are removed from the backtrace.

Stephen
 
A

ara.t.howard

Exception.setFilter(regularExpression)

where the matching items are removed from the backtrace.

what would be matched?

e.to_s, e.message.to_s, or e.backtrace.any?{|b|}

regards.

-a
 
S

Sylvain Joyeux

IIRC, this only happens when the exception is handled by the top level
interpreter. If you catch the exception yourself at the top level you
can print out whatever you want, including the full stack trace.
Yes, that's what I did as a workaround. But you have to do it for every
thread and every fork (which in my case is 4 different places)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,204
Messages
2,571,066
Members
47,673
Latest member
MahaliaPal

Latest Threads

Top