@@ -4,6 +4,7 @@ import { TextEncoder } from '@nativescript/core/text';
44import { createArrayBuffer } from '@nativescript-community/arraybuffers' ;
55declare class TestClass {
66 static someMethod ( ) ;
7+ static helloWorld ( str : string ) ;
78}
89
910export default {
@@ -85,7 +86,7 @@ export default {
8586 } ) ;
8687 } ,
8788 throwError ( ) {
88-
89+
8990 Sentry . captureException ( new Error ( 'test_notify_error' + Date . now ( ) ) ) ;
9091 } ,
9192 leaveBreadcrumb ( ) {
@@ -99,8 +100,12 @@ export default {
99100 } ,
100101 androidNativeCrashCatchedTest ( ) {
101102 try {
102- console . log ( 'androidNativeCrashTest' , ( com as any ) . nativescript . sentry . ClassExample . helloWorld ( 'test3' ) ) ;
103-
103+ if ( __ANDROID__ ) {
104+ console . log ( 'androidNativeCrashTest' , ( com as any ) . nativescript . sentry . ClassExample . helloWorld ( 'test3' ) ) ;
105+ }
106+ if ( __IOS__ ) {
107+ console . log ( 'iosNativeCrashTest' , TestClass . helloWorld ( 'test3' ) ) ;
108+ }
104109 } catch ( error ) {
105110 // console.error('error', error);
106111 // console.error('keys', Object.keys(error));
@@ -113,7 +118,12 @@ export default {
113118 }
114119 } ,
115120 androidNativeCrashTest ( ) {
116- console . log ( 'androidNativeCrashTest' , ( com as any ) . nativescript . sentry . ClassExample . helloWorld ( 'test3' ) ) ;
121+ if ( __ANDROID__ ) {
122+ console . log ( 'androidNativeCrashTest' , ( com as any ) . nativescript . sentry . ClassExample . helloWorld ( 'test3' ) ) ;
123+ }
124+ if ( __IOS__ ) {
125+ console . log ( 'iosNativeCrashTest' , TestClass . helloWorld ( 'test3' ) ) ;
126+ }
117127 } ,
118128 flush ( ) {
119129 Sentry . flush ( ) ;
0 commit comments