You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If you trhow an Error in try/catch the stack and stackTrace fields show different information than if the error is handled in the global.__onUncaughtError
To Reproduce
Create a new js application tns create test --js
Open app/main-view-model and replace its content with the following:
JS: CAUGHT MESSAGE: Test
JS: CAUGHT STACK: Error: Test
JS: at Observable.viewModel.onTap file:///app/main-view-model.js:14:0
JS: at Button.push.../node_modules/tns-core-modules/data/observable/observable.js.Observable.notify file:///node_modules/tns-core-modules/data/observable/observable.js:107:0
JS: at Button.push.../node_modules/tns-core-modules/data/observable/observable.js.Observable._emit file:///node_modules/tns-core-modules/data/observable/observable.js:127:0
JS: at Object.ClickListenerImpl.onClick file:///node_modules/tns-core-modules/ui/button/button.js:29:0
JS: CAUGHT STACKTRACE: undefined
..........
JS: UNCAUGHT MESSAGE: Calling js method onClick failed
JS: Error: Test
JS: UNCAUGHT STACK: Error: Calling js method onClick failed
JS: Error: Test
JS: UNCAUGHT STACKTRACE: viewModel.onTapfile:///app/main-view-model.js:20:0
JS: at push.../node_modules/tns-core-modules/data/observable/observable.js.Observable.notifyfile:///node_modules/tns-core-modules/data/observable/observable.js:107:0
JS: at push.../node_modules/tns-core-modules/data/observable/observable.js.Observable._emitfile:///node_modules/tns-core-modules/data/observable/observable.js:127:0
JS: at ClickListenerImpl.onClickfile:///node_modules/tns-core-modules/ui/button/button.js:29:0
JS: at com.tns.Runtime.callJSMethodNative(Native Method)
JS: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1209)
JS: at com.tns.Runtime.callJSMethodImpl(Runtime.java:1096)
JS: at com.tns.Runtime.callJSMethod(Runtime.java:1083)
JS: at com.tns.Runtime.callJSMethod(Runtime.java:1063)
JS: at com.tns.Runtime.callJSMethod(Runtime.java:1055)
JS: at com.tns.gen.java.lang.Object_vendor_14594_32_ClickListenerImpl.onClick(Object_vendor_14594_32_ClickListenerImpl.java:18)
JS: at android.view.View.performClick(View.java...
as you can see the CAUGHT and UNCAUGHT stack and stackTrace differ a lot
Expected behavior
The stack and stackTrace properties should be the same in both cases. stack should contain the JS error and stackTrace should contain both.
Additional context
Check the same functionality in iOS runtime.
The text was updated successfully, but these errors were encountered:
Actually the "stackTrace" property, in that case, cannot be set as there is no native code and the exception doesn't get to the runtime code as it is handled in V8.
Describe the bug
If you trhow an Error in try/catch the stack and stackTrace fields show different information than if the error is handled in the global.__onUncaughtError
To Reproduce
tns create test --js
In the CLI output you will see:
as you can see the CAUGHT and UNCAUGHT stack and stackTrace differ a lot
Expected behavior
The stack and stackTrace properties should be the same in both cases. stack should contain the JS error and stackTrace should contain both.
Additional context
Check the same functionality in iOS runtime.
The text was updated successfully, but these errors were encountered: