@@ -624,27 +624,26 @@ NativeModule getNativeModule(String nativeModuleName) {
624624 /* package */
625625 @ Nullable
626626 RuntimeExecutor getRuntimeExecutor () {
627+ final String method = "getRuntimeExecutor()" ;
628+
627629 final ReactInstance reactInstance = mReactInstanceTaskRef .get ().getResult ();
628630 if (reactInstance != null ) {
629631 return reactInstance .getBufferedRuntimeExecutor ();
630632 }
631- ReactSoftExceptionLogger .logSoftException (
632- TAG ,
633- new ReactNoCrashSoftException ("Tried to get runtime executor while instance is not ready" ));
633+ raiseSoftException (method , "Tried to get runtime executor while instance is not ready" );
634634 return null ;
635635 }
636636
637637 /* package */
638638 @ Nullable
639639 CallInvokerHolder getJSCallInvokerHolder () {
640+ final String method = "getJSCallInvokerHolder()" ;
641+
640642 final ReactInstance reactInstance = mReactInstanceTaskRef .get ().getResult ();
641643 if (reactInstance != null ) {
642644 return reactInstance .getJSCallInvokerHolder ();
643645 }
644- ReactSoftExceptionLogger .logSoftException (
645- TAG ,
646- new ReactNoCrashSoftException (
647- "Tried to get JSCallInvokerHolder while instance is not ready" ));
646+ raiseSoftException (method , "Tried to get JSCallInvokerHolder while instance is not ready" );
648647 return null ;
649648 }
650649
@@ -667,16 +666,12 @@ public void onActivityResult(
667666 + "\" , data = \" "
668667 + data
669668 + "\" )" ;
670- log (method );
671669
672670 ReactContext currentContext = getCurrentReactContext ();
673671 if (currentContext != null ) {
674672 currentContext .onActivityResult (activity , requestCode , resultCode , data );
675673 } else {
676- ReactSoftExceptionLogger .logSoftException (
677- TAG ,
678- new ReactNoCrashSoftException (
679- "Tried to access onActivityResult while context is not ready" ));
674+ raiseSoftException (method , "Tried to access onActivityResult while context is not ready" );
680675 }
681676 }
682677
@@ -685,16 +680,12 @@ public void onActivityResult(
685680 @ Override
686681 public void onWindowFocusChange (boolean hasFocus ) {
687682 final String method = "onWindowFocusChange(hasFocus = \" " + hasFocus + "\" )" ;
688- log (method );
689683
690684 ReactContext currentContext = getCurrentReactContext ();
691685 if (currentContext != null ) {
692686 currentContext .onWindowFocusChange (hasFocus );
693687 } else {
694- ReactSoftExceptionLogger .logSoftException (
695- TAG ,
696- new ReactNoCrashSoftException (
697- "Tried to access onWindowFocusChange while context is not ready" ));
688+ raiseSoftException (method , "Tried to access onWindowFocusChange while context is not ready" );
698689 }
699690 }
700691
@@ -705,7 +696,7 @@ public void onWindowFocusChange(boolean hasFocus) {
705696 @ ThreadConfined (UI )
706697 @ Override
707698 public void onNewIntent (Intent intent ) {
708- log ( "onNewIntent()" ) ;
699+ final String method = "onNewIntent(intent = \" " + intent + " \" )" ;
709700
710701 ReactContext currentContext = getCurrentReactContext ();
711702 if (currentContext != null ) {
@@ -723,9 +714,7 @@ public void onNewIntent(Intent intent) {
723714 }
724715 currentContext .onNewIntent (getCurrentActivity (), intent );
725716 } else {
726- ReactSoftExceptionLogger .logSoftException (
727- TAG ,
728- new ReactNoCrashSoftException ("Tried to access onNewIntent while context is not ready" ));
717+ raiseSoftException (method , "Tried to access onNewIntent while context is not ready" );
729718 }
730719 }
731720
0 commit comments