Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Trace shouldn't contain stacktrace.js internals #65

fresheneesz opened this Issue · 8 comments

4 participants


The library should remove the parts of the stack that are stactrace.js internals - that won't be useful information to anybody.


:+1: this could be implemented as stack frame filter, it'll give possibility to exclude any libraries eg. jquery, underscore etc.


Why not just always tear off the top 3 lines? A stack frame filter will still require people to explicitly work out how to filter it every time. Wouldn't it be better to just never output those parts of the stack?


Perhaps a configurable filter that defaults to excluding only stacktrace.js functions. Extra points if we can filter on file names as well.


@fresheneesz because top 3 lines shouldn't necessarily contain code from stacktrace.js, e.g. when processing captured exception. OTOH filter may have stacktrace.js or its function names as default value.


Yes of course, in that case it shouldn't strip any lines. Isn't that, in fact, the only time when the top 3 lines won't contain code from stacktrace.js?


Absolutely right. But I prefer to not to implement it with if (!exception) {skip 3 lines}. Especially when there is a possibility of more universal and reusable solution.


Fair enough then. Though, if it were me running the project, I would consider filtering to be completely unrelated to a module for getting stacktraces. Definitely is up to you tho.


Agree, I was surprised to see printStackTrace internals in the resulting stacktrace - it's completely irrelevant.

@eriwen eriwen added this to the 1.0 milestone
@eriwen eriwen closed this issue from a commit
Eric Wendelin Implement StackTrace.fromError using ES6Promise.
Use StackTraceGPS for source map support for #44.
Filter out stacktrace.js internals by default fixes #65.
@eriwen eriwen closed this in 3f1c690
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.