feat: OnDiscardedError typings and event (#6777)

* feat: OnDiscardedError typings and event

* remove ios and android from DiscardedErrorEventData
This commit is contained in:
Vasil Trifonov
2019-01-09 18:24:25 +02:00
committed by GitHub
parent 4cda0e7345
commit 28db2afbd4
5 changed files with 47 additions and 10 deletions

View File

@@ -81,6 +81,13 @@ application.on(application.uncaughtErrorEvent, function(args: application.Unhand
console.log("### stack: " + args.error.stack);
});
application.on(application.discardedErrorEvent, function(args: application.DiscardedErrorEventData) {
console.log("### [Discarded] NativeScriptError: " + args.error);
console.log("### [Discarded] nativeException: " + (<any>args.error).nativeException);
console.log("### [Discarded] stackTrace: " + (<any>args.error).stackTrace);
console.log("### [Discarded] stack: " + args.error.stack);
});
application.setCssFileName("ui-tests-app/app.css");
application.start({ moduleName: "ui-tests-app/main-page" });