File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
Filter options
packages/core/application Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
Original file line number Diff line number Diff line change @@ -80,14 +80,14 @@ Application.on(Application.lowMemoryEvent, function (args: ApplicationEventData)
80
80
// Error events.
81
81
Application . on ( Application . uncaughtErrorEvent , function ( args : UnhandledErrorEventData ) {
82
82
console . log ( 'NativeScriptError:' , args . error ) ;
83
- console . log ( ( < any > args . error ) . nativeException ?? ( < any > args . error ) . nativeError ) ;
84
- console . log ( ( < any > args . error ) . stackTrace ?? ( < any > args . error ) . stack ) ;
83
+ console . log ( args . error . nativeException ?? ( < any > args . error ) . nativeError ) ;
84
+ console . log ( args . error . stackTrace ?? args . error . stack ) ;
85
85
} ) ;
86
86
87
87
Application . on ( Application . discardedErrorEvent , function ( args : DiscardedErrorEventData ) {
88
88
console . log ( '[Discarded] NativeScriptError:' , args . error ) ;
89
- console . log ( ( < any > args . error ) . nativeException ?? ( < any > args . error ) . nativeError ) ;
90
- console . log ( ( < any > args . error ) . stackTrace ?? ( < any > args . error ) . stack ) ;
89
+ console . log ( args . error . nativeException ?? ( < any > args . error ) . nativeError ) ;
90
+ console . log ( args . error . stackTrace ?? args . error . stack ) ;
91
91
} ) ;
92
92
93
93
// Android activity events.
Original file line number Diff line number Diff line change @@ -9,7 +9,15 @@ export interface NativeScriptError extends Error {
9
9
/**
10
10
* Represents the native error object.
11
11
*/
12
- nativeError : any ;
12
+ nativeException ?: any ;
13
+ /**
14
+ * The native stack trace.
15
+ */
16
+ stackTrace ?: string ;
17
+ /**
18
+ * Javascript portion of stack trace.
19
+ */
20
+ stack ?: string ;
13
21
}
14
22
15
23
/**
You can’t perform that action at this time.
0 commit comments