@@ -624,27 +624,26 @@ NativeModule getNativeModule(String nativeModuleName) {
624
624
/* package */
625
625
@ Nullable
626
626
RuntimeExecutor getRuntimeExecutor () {
627
+ final String method = "getRuntimeExecutor()" ;
628
+
627
629
final ReactInstance reactInstance = mReactInstanceTaskRef .get ().getResult ();
628
630
if (reactInstance != null ) {
629
631
return reactInstance .getBufferedRuntimeExecutor ();
630
632
}
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" );
634
634
return null ;
635
635
}
636
636
637
637
/* package */
638
638
@ Nullable
639
639
CallInvokerHolder getJSCallInvokerHolder () {
640
+ final String method = "getJSCallInvokerHolder()" ;
641
+
640
642
final ReactInstance reactInstance = mReactInstanceTaskRef .get ().getResult ();
641
643
if (reactInstance != null ) {
642
644
return reactInstance .getJSCallInvokerHolder ();
643
645
}
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" );
648
647
return null ;
649
648
}
650
649
@@ -667,16 +666,12 @@ public void onActivityResult(
667
666
+ "\" , data = \" "
668
667
+ data
669
668
+ "\" )" ;
670
- log (method );
671
669
672
670
ReactContext currentContext = getCurrentReactContext ();
673
671
if (currentContext != null ) {
674
672
currentContext .onActivityResult (activity , requestCode , resultCode , data );
675
673
} 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" );
680
675
}
681
676
}
682
677
@@ -685,16 +680,12 @@ public void onActivityResult(
685
680
@ Override
686
681
public void onWindowFocusChange (boolean hasFocus ) {
687
682
final String method = "onWindowFocusChange(hasFocus = \" " + hasFocus + "\" )" ;
688
- log (method );
689
683
690
684
ReactContext currentContext = getCurrentReactContext ();
691
685
if (currentContext != null ) {
692
686
currentContext .onWindowFocusChange (hasFocus );
693
687
} 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" );
698
689
}
699
690
}
700
691
@@ -705,7 +696,7 @@ public void onWindowFocusChange(boolean hasFocus) {
705
696
@ ThreadConfined (UI )
706
697
@ Override
707
698
public void onNewIntent (Intent intent ) {
708
- log ( "onNewIntent()" ) ;
699
+ final String method = "onNewIntent(intent = \" " + intent + " \" )" ;
709
700
710
701
ReactContext currentContext = getCurrentReactContext ();
711
702
if (currentContext != null ) {
@@ -723,9 +714,7 @@ public void onNewIntent(Intent intent) {
723
714
}
724
715
currentContext .onNewIntent (getCurrentActivity (), intent );
725
716
} 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" );
729
718
}
730
719
}
731
720
0 commit comments