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:
@@ -90,6 +90,12 @@ application.on(application.uncaughtErrorEvent, function (args: application.Unhan
|
||||
console.log((<any>args.error).stackTrace || (<any>args.error).stack);
|
||||
});
|
||||
|
||||
application.on(application.discardedErrorEvent, function (args: application.DiscardedErrorEventData) {
|
||||
console.log("[Discarded] NativeScriptError: " + args.error);
|
||||
console.log((<any>args.error).nativeException || (<any>args.error).nativeError);
|
||||
console.log((<any>args.error).stackTrace || (<any>args.error).stack);
|
||||
});
|
||||
|
||||
// Android activity events
|
||||
if (application.android) {
|
||||
application.android.on(application.AndroidApplication.activityCreatedEvent, function (args: application.AndroidActivityBundleEventData) {
|
||||
|
||||
Reference in New Issue
Block a user