#2147 Stack trace manipulation / filter

SlimerDude Tue 21 May 2013

Kindof related to Cap stack trace depth? ...

Lately, I frequently need to see more of the stack trace than the default 20 frames. But when the trace is reported by, say, draft or an Actor, then you have little say over how much of the trace is shown - so it's usually just the standard 20. (*)

It might be nice if, when an Err is created, you had a say over what frames are contributed to the stack trace. That way libraries, if they deem necessary, could filter out meaningless cruft before the Err is thrown.

throw Err("Eeek!") {
  it.frameFilter = |Str frame -> Bool| { frame.contains("MyLibPod::RecursiveClass") }

(*) A simple solution would be to read the default maxDepth from a config file.

brian Tue 21 May 2013

We can just bump up the default too if everyone wants that

SlimerDude Tue 21 May 2013

In my experience, there is always contention around a default value. Some want less, others need more, blah, blah... But if you make it configurable, no-one has a reason to whinge anymore!

So I think a property, in something like etc/sys/config.properties, would work best.

Having said that... maybe 25!? :)

SlimerDude Wed 24 Jul 2013

Bump thread.

I'd like to see the default maxDepth bumped up. Too often I have no control over when / where / how the stack gets printed.

50 doesn't seem too unwieldy.

brian Wed 31 Jul 2013

Promoted to ticket #2147 and assigned to brian

brian Wed 31 Jul 2013

Ticket resolved in 1.0.66

I bumped up the default to 25 and then I made it configurable in etc/sys/config.props using the key "errTraceMaxDepth"

SlimerDude Wed 31 Jul 2013

Sweet! :)

Login or Signup to reply.