How to test if something is a stack trace

Perhaps collect stacktraces rather than backtraces? The docs for stacktrace say it returns a vector of StackFrames, so this should be less fragile:

is_stacktrace(x) = x isa AbstractVector{StackTraces.StackFrame}
2 Likes