File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -6,15 +6,15 @@ import {
6
6
processColor
7
7
} from 'react-native' ;
8
8
let { Instabug } = NativeModules ;
9
- import InstabugUtils from './utils/InstabugUtils' ;
9
+ import { parseErrorStack , captureJsErrors } from './utils/InstabugUtils' ;
10
10
import BugReporting from './modules/BugReporting' ;
11
11
import Surveys from './modules/Surveys' ;
12
12
import FeatureRequests from './modules/FeatureRequests' ;
13
13
import Chats from './modules/Chats' ;
14
14
import Replies from './modules/Replies' ;
15
15
import CrashReporting from './modules/CrashReporting' ;
16
16
17
- InstabugUtils . captureJsErrors ( ) ;
17
+ captureJsErrors ( ) ;
18
18
19
19
/**
20
20
* Instabug
@@ -609,7 +609,7 @@ const InstabugModule = {
609
609
*/
610
610
611
611
reportJSException : function ( errorObject ) {
612
- let jsStackTrace = InstabugUtils . parseErrorStack ( errorObject ) ;
612
+ let jsStackTrace = parseErrorStack ( errorObject ) ;
613
613
var jsonObject = {
614
614
message : errorObject . name + ' - ' + errorObject . message ,
615
615
os : Platform . OS ,
Original file line number Diff line number Diff line change 1
1
import { NativeModules , Platform } from 'react-native' ;
2
- import InstabugUtils from '../utils/InstabugUtils' ;
2
+ import { parseErrorStack } from '../utils/InstabugUtils' ;
3
3
let { Instabug } = NativeModules ;
4
4
5
5
/**
@@ -22,7 +22,7 @@ export default {
22
22
* @param errorObject Error object to be sent to Instabug's servers
23
23
*/
24
24
reportJSException : function ( errorObject ) {
25
- let jsStackTrace = InstabugUtils . parseErrorStack ( errorObject ) ;
25
+ let jsStackTrace = parseErrorStack ( errorObject ) ;
26
26
var jsonObject = {
27
27
message : errorObject . name + ' - ' + errorObject . message ,
28
28
os : Platform . OS ,
Original file line number Diff line number Diff line change @@ -3,13 +3,13 @@ import {NativeModules, Platform} from 'react-native';
3
3
let { Instabug} = NativeModules ;
4
4
import parseErrorStackLib from '../../react-native/Libraries/Core/Devtools/parseErrorStack.js' ;
5
5
6
- let parseErrorStack = ( error ) => {
6
+ export const parseErrorStack = ( error ) => {
7
7
return parseErrorStackLib ( error ) ;
8
8
} ;
9
9
10
10
const originalHandler = global . ErrorUtils . getGlobalHandler ( ) ;
11
11
12
- let init = ( ) => {
12
+ export const captureJsErrors = ( ) => {
13
13
if ( __DEV__ ) {
14
14
return ;
15
15
}
@@ -43,6 +43,6 @@ let init = () => {
43
43
} ;
44
44
45
45
export default {
46
- parseErrorStack : parseErrorStack ,
47
- captureJsErrors : init
46
+ parseErrorStack,
47
+ captureJsErrors
48
48
} ;
You can’t perform that action at this time.
0 commit comments