Print only part of a stack trace

Jacob Carlborg doob at me.com
Wed Jul 1 18:05:09 UTC 2020


On 2020-07-01 19:44, Dennis wrote:
> On assertion failure, the default error handler prints a stack trace 
> that looks like this
> 
> [library functions]
> [application functions]
> [druntime start-up functions]
> 
> I'm only interested in application functions, the rest is noise.
> I could easily filter unwanted lines out if I had the stack trace in 
> string form, but I don't know how to obtain that. Is there a simple way 
> to do this, or should I delve into Druntime internals?

Could `Runtime.traceHandler` [1] be that you're looking for?

[1] https://dlang.org/phobos/core_runtime.html#.Runtime.traceHandler

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list