Open
Description
Testing on android 6.01 (pure) Moto X Play
[ro.build.version.sdk]: [23]
say you have in your template
<Label text="test event" (tap)="testEvent()"></Label>
and in your code the method
private testEvent() : void {
throw Error("This error will not show up");
}
when the click on it the error that will show up will be
An uncaught Exception occurred on "main" thread.
com.tns.NativeScriptException:
Calling js method onTouch failed
which is not all that helpful
the work around
private testEvent() : void {
try {
throw Error("This error will show up");
} catch(e) {
console.log((<Error>e).message);
}
}