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 {
66 processColor
77} from 'react-native' ;
88let { Instabug } = NativeModules ;
9- import InstabugUtils from './utils/InstabugUtils' ;
9+ import { parseErrorStack , captureJsErrors } from './utils/InstabugUtils' ;
1010import BugReporting from './modules/BugReporting' ;
1111import Surveys from './modules/Surveys' ;
1212import FeatureRequests from './modules/FeatureRequests' ;
1313import Chats from './modules/Chats' ;
1414import Replies from './modules/Replies' ;
1515import CrashReporting from './modules/CrashReporting' ;
1616
17- InstabugUtils . captureJsErrors ( ) ;
17+ captureJsErrors ( ) ;
1818
1919/**
2020 * Instabug
@@ -609,7 +609,7 @@ const InstabugModule = {
609609 */
610610
611611 reportJSException : function ( errorObject ) {
612- let jsStackTrace = InstabugUtils . parseErrorStack ( errorObject ) ;
612+ let jsStackTrace = parseErrorStack ( errorObject ) ;
613613 var jsonObject = {
614614 message : errorObject . name + ' - ' + errorObject . message ,
615615 os : Platform . OS ,
Original file line number Diff line number Diff line change 11import { NativeModules , Platform } from 'react-native' ;
2- import InstabugUtils from '../utils/InstabugUtils' ;
2+ import { parseErrorStack } from '../utils/InstabugUtils' ;
33let { Instabug } = NativeModules ;
44
55/**
@@ -22,7 +22,7 @@ export default {
2222 * @param errorObject Error object to be sent to Instabug's servers
2323 */
2424 reportJSException : function ( errorObject ) {
25- let jsStackTrace = InstabugUtils . parseErrorStack ( errorObject ) ;
25+ let jsStackTrace = parseErrorStack ( errorObject ) ;
2626 var jsonObject = {
2727 message : errorObject . name + ' - ' + errorObject . message ,
2828 os : Platform . OS ,
Original file line number Diff line number Diff line change @@ -3,13 +3,13 @@ import {NativeModules, Platform} from 'react-native';
33let { Instabug} = NativeModules ;
44import parseErrorStackLib from '../../react-native/Libraries/Core/Devtools/parseErrorStack.js' ;
55
6- let parseErrorStack = ( error ) => {
6+ export const parseErrorStack = ( error ) => {
77 return parseErrorStackLib ( error ) ;
88} ;
99
1010const originalHandler = global . ErrorUtils . getGlobalHandler ( ) ;
1111
12- let init = ( ) => {
12+ export const captureJsErrors = ( ) => {
1313 if ( __DEV__ ) {
1414 return ;
1515 }
@@ -43,6 +43,6 @@ let init = () => {
4343} ;
4444
4545export default {
46- parseErrorStack : parseErrorStack ,
47- captureJsErrors : init
46+ parseErrorStack,
47+ captureJsErrors
4848} ;
You can’t perform that action at this time.
0 commit comments