mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat: OnDiscardedError typings and event (#6777)
* feat: OnDiscardedError typings and event * remove ios and android from DiscardedErrorEventData
This commit is contained in:
@@ -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" });
|
||||
|
||||
Reference in New Issue
Block a user