Skip to content

Unify JS stack trace when exception is thrown #1443

@vtrifonov

Description

@vtrifonov

Is your feature request related to a problem? Please describe.
When an exception is thrown the JS stack trace is output in the following format:

System.err: StackTrace:
System.err: 	Frame: function:'viewModel.onTap', file:'file:///app/main-view-model.js:17:0
System.err: 	Frame: function:'push.../node_modules/tns-core-modules/data/observable/observable.js.Observable.notify', file:'file:///node_modules/tns-core-modules/data/observable/observable.js:107:0
System.err: 	Frame: function:'push.../node_modules/tns-core-modules/data/observable/observable.js.Observable._emit', file:'file:///node_modules/tns-core-modules/data/observable/observable.js:127:0
System.err: 	Frame: function:'ClickListenerImpl.onClick', file:'file:///node_modules/tns-core-modules/ui/button/button.js:29:0

Describe the solution you'd like
The stack trace should match the Java stack trace which is the same as the format when using console.trace
Here's the desired output:

System.err: StackTrace:
System.err: 	viewModel.onTap(file:///data/data/org.nativescript.test/files/app/main-view-model.js:17:0)
System.err: 	at push.../node_modules/tns-core-modules/data/observable/observable.js.Observable.notify(file:///node_modules/tns-core-modules/data/observable/observable.js:107:0)
System.err: 	at push.../node_modules/tns-core-modules/data/observable/observable.js.Observable._emit(file:///node_modules/tns-core-modules/data/observable/observable.js:127:0)
System.err: 	at ClickListenerImpl.onClick(file:///node_modules/tns-core-modules/ui/button/button.js:29:0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions