Java Code Examples for com.facebook.react.bridge.NativeModuleCallExceptionHandler

The following are top voted examples for showing how to use com.facebook.react.bridge.NativeModuleCallExceptionHandler. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: ReactNativeSignatureExample   File: ReactTestHelper.java   View source code 6 votes vote down vote up
@Override
public CatalystInstance build() {
  return new CatalystInstanceImpl.Builder()
    .setReactQueueConfigurationSpec(ReactQueueConfigurationSpec.createDefault())
    .setJSExecutor(new JSCJavaScriptExecutor(new WritableNativeMap()))
    .setRegistry(mNativeModuleRegistryBuilder.build())
    .setJSModulesConfig(mJSModulesConfigBuilder.build())
    .setJSBundleLoader(JSBundleLoader.createFileLoader(
                         mContext,
                         "assets://AndroidTestBundle.js"))
    .setNativeModuleCallExceptionHandler(
      new NativeModuleCallExceptionHandler() {
          @Override
          public void handleException(Exception e) {
            throw new RuntimeException(e);
          }
      })
    .build();
}
 
Example 2
Project: react-native-ibeacon-android   File: ReactTestHelper.java   View source code 6 votes vote down vote up
@Override
public CatalystInstance build() {
  return new CatalystInstanceImpl.Builder()
    .setReactQueueConfigurationSpec(ReactQueueConfigurationSpec.createDefault())
    .setJSExecutor(new JSCJavaScriptExecutor(new WritableNativeMap()))
    .setRegistry(mNativeModuleRegistryBuilder.build())
    .setJSModulesConfig(mJSModulesConfigBuilder.build())
    .setJSBundleLoader(JSBundleLoader.createFileLoader(
                         mContext,
                         "assets://AndroidTestBundle.js"))
    .setNativeModuleCallExceptionHandler(
      new NativeModuleCallExceptionHandler() {
          @Override
          public void handleException(Exception e) {
            throw new RuntimeException(e);
          }
      })
    .build();
}
 
Example 3
Project: react-native-box-loaders   File: ReactTestHelper.java   View source code 6 votes vote down vote up
@Override
public CatalystInstance build() {
  return new CatalystInstanceImpl.Builder()
    .setReactQueueConfigurationSpec(ReactQueueConfigurationSpec.createDefault())
    .setJSExecutor(new JSCJavaScriptExecutor(new WritableNativeMap()))
    .setRegistry(mNativeModuleRegistryBuilder.build())
    .setJSModulesConfig(mJSModulesConfigBuilder.build())
    .setJSBundleLoader(JSBundleLoader.createFileLoader(
                         mContext,
                         "assets://AndroidTestBundle.js"))
    .setNativeModuleCallExceptionHandler(
      new NativeModuleCallExceptionHandler() {
          @Override
          public void handleException(Exception e) {
            throw new RuntimeException(e);
          }
      })
    .build();
}
 
Example 4
Project: react-native-threads   File: ReactContextBuilder.java   View source code 5 votes vote down vote up
private NativeModuleCallExceptionHandler createNativeModuleExceptionHandler() {
    return new NativeModuleCallExceptionHandler() {
        @Override
        public void handleException(Exception e) {
            throw new RuntimeException(e);
        }
    };
}
 
Example 5
Project: RNLearn_Project1   File: CatalystInstanceImpl.java   View source code 5 votes vote down vote up
private CatalystInstanceImpl(
    final ReactQueueConfigurationSpec ReactQueueConfigurationSpec,
    final JavaScriptExecutor jsExecutor,
    final NativeModuleRegistry registry,
    final JavaScriptModuleRegistry jsModuleRegistry,
    final JSBundleLoader jsBundleLoader,
    NativeModuleCallExceptionHandler nativeModuleCallExceptionHandler) {
  FLog.d(ReactConstants.TAG, "Initializing React Xplat Bridge.");
  mHybridData = initHybrid();

  mReactQueueConfiguration = ReactQueueConfigurationImpl.create(
      ReactQueueConfigurationSpec,
      new NativeExceptionHandler());
  mBridgeIdleListeners = new CopyOnWriteArrayList<>();
  mJavaRegistry = registry;
  mJSModuleRegistry = jsModuleRegistry;
  mJSBundleLoader = jsBundleLoader;
  mNativeModuleCallExceptionHandler = nativeModuleCallExceptionHandler;
  mNativeModulesQueueThread = mReactQueueConfiguration.getNativeModulesQueueThread();
  mTraceListener = new JSProfilerTraceListener(this);

  FLog.d(ReactConstants.TAG, "Initializing React Xplat Bridge before initializeBridge");
  initializeBridge(
    new BridgeCallback(this),
    jsExecutor,
    mReactQueueConfiguration.getJSQueueThread(),
    mNativeModulesQueueThread,
    mJavaRegistry.getJavaModules(this),
    mJavaRegistry.getCxxModules());
  FLog.d(ReactConstants.TAG, "Initializing React Xplat Bridge after initializeBridge");
  mMainExecutorToken = getMainExecutorToken();
}
 
Example 6
Project: RNLearn_Project1   File: CatalystInstanceImpl.java   View source code 5 votes vote down vote up
private CatalystInstanceImpl(
    final ReactQueueConfigurationSpec ReactQueueConfigurationSpec,
    final JavaScriptExecutor jsExecutor,
    final NativeModuleRegistry registry,
    final JavaScriptModuleRegistry jsModuleRegistry,
    final JSBundleLoader jsBundleLoader,
    NativeModuleCallExceptionHandler nativeModuleCallExceptionHandler) {
  FLog.w(ReactConstants.TAG, "Initializing React Xplat Bridge.");
  mHybridData = initHybrid();

  mReactQueueConfiguration = ReactQueueConfigurationImpl.create(
      ReactQueueConfigurationSpec,
      new NativeExceptionHandler());
  mBridgeIdleListeners = new CopyOnWriteArrayList<>();
  mJavaRegistry = registry;
  mJSModuleRegistry = jsModuleRegistry;
  mJSBundleLoader = jsBundleLoader;
  mNativeModuleCallExceptionHandler = nativeModuleCallExceptionHandler;
  mNativeModulesQueueThread = mReactQueueConfiguration.getNativeModulesQueueThread();
  mTraceListener = new JSProfilerTraceListener(this);

  FLog.w(ReactConstants.TAG, "Initializing React Xplat Bridge before initializeBridge");
  initializeBridge(
    new BridgeCallback(this),
    jsExecutor,
    mReactQueueConfiguration.getJSQueueThread(),
    mNativeModulesQueueThread,
    mJavaRegistry.getJavaModules(this),
    mJavaRegistry.getCxxModules());
  FLog.w(ReactConstants.TAG, "Initializing React Xplat Bridge after initializeBridge");
  mMainExecutorToken = getMainExecutorToken();
}
 
Example 7
Project: ReactNativeSignatureExample   File: ReactInstanceManagerImpl.java   View source code 5 votes vote down vote up
ReactInstanceManagerImpl(
    Context applicationContext,
    @Nullable String jsBundleFile,
    @Nullable String jsMainModuleName,
    List<ReactPackage> packages,
    boolean useDeveloperSupport,
    @Nullable NotThreadSafeBridgeIdleDebugListener bridgeIdleDebugListener,
    LifecycleState initialLifecycleState,
    UIImplementationProvider uiImplementationProvider,
    NativeModuleCallExceptionHandler nativeModuleCallExceptionHandler,
    @Nullable JSCConfig jscConfig) {
  initializeSoLoaderIfNecessary(applicationContext);

  // TODO(9577825): remove this
  ApplicationHolder.setApplication((Application) applicationContext.getApplicationContext());
  setDisplayMetrics(applicationContext);

  mApplicationContext = applicationContext;
  mJSBundleFile = jsBundleFile;
  mJSMainModuleName = jsMainModuleName;
  mPackages = packages;
  mUseDeveloperSupport = useDeveloperSupport;
  mDevSupportManager = DevSupportManagerFactory.create(
      applicationContext,
      mDevInterface,
      mJSMainModuleName,
      useDeveloperSupport);
  mBridgeIdleDebugListener = bridgeIdleDebugListener;
  mLifecycleState = initialLifecycleState;
  mUIImplementationProvider = uiImplementationProvider;
  mMemoryPressureRouter = new MemoryPressureRouter(applicationContext);
  mNativeModuleCallExceptionHandler = nativeModuleCallExceptionHandler;
  mJSCConfig = jscConfig;
}
 
Example 8
Project: react-native-workers   File: ReactContextBuilder.java   View source code 5 votes vote down vote up
private NativeModuleCallExceptionHandler createNativeModuleExceptionHandler() {
    return new NativeModuleCallExceptionHandler() {
        @Override
        public void handleException(Exception e) {
            throw new RuntimeException(e);
        }
    };
}
 
Example 9
Project: react-native-ibeacon-android   File: ReactInstanceManagerImpl.java   View source code 5 votes vote down vote up
ReactInstanceManagerImpl(
    Context applicationContext,
    @Nullable String jsBundleFile,
    @Nullable String jsMainModuleName,
    List<ReactPackage> packages,
    boolean useDeveloperSupport,
    @Nullable NotThreadSafeBridgeIdleDebugListener bridgeIdleDebugListener,
    LifecycleState initialLifecycleState,
    UIImplementationProvider uiImplementationProvider,
    NativeModuleCallExceptionHandler nativeModuleCallExceptionHandler,
    @Nullable JSCConfig jscConfig) {
  initializeSoLoaderIfNecessary(applicationContext);

  // TODO(9577825): remove this
  ApplicationHolder.setApplication((Application) applicationContext.getApplicationContext());
  setDisplayMetrics(applicationContext);

  mApplicationContext = applicationContext;
  mJSBundleFile = jsBundleFile;
  mJSMainModuleName = jsMainModuleName;
  mPackages = packages;
  mUseDeveloperSupport = useDeveloperSupport;
  mDevSupportManager = DevSupportManagerFactory.create(
      applicationContext,
      mDevInterface,
      mJSMainModuleName,
      useDeveloperSupport);
  mBridgeIdleDebugListener = bridgeIdleDebugListener;
  mLifecycleState = initialLifecycleState;
  mUIImplementationProvider = uiImplementationProvider;
  mMemoryPressureRouter = new MemoryPressureRouter(applicationContext);
  mNativeModuleCallExceptionHandler = nativeModuleCallExceptionHandler;
  mJSCConfig = jscConfig;
}
 
Example 10
Project: react-native-box-loaders   File: ReactInstanceManagerImpl.java   View source code 5 votes vote down vote up
ReactInstanceManagerImpl(
    Context applicationContext,
    @Nullable Activity currentActivity,
    @Nullable DefaultHardwareBackBtnHandler defaultHardwareBackBtnHandler,
    @Nullable String jsBundleFile,
    @Nullable String jsMainModuleName,
    List<ReactPackage> packages,
    boolean useDeveloperSupport,
    @Nullable NotThreadSafeBridgeIdleDebugListener bridgeIdleDebugListener,
    LifecycleState initialLifecycleState,
    UIImplementationProvider uiImplementationProvider,
    NativeModuleCallExceptionHandler nativeModuleCallExceptionHandler,
    @Nullable JSCConfig jscConfig) {
  initializeSoLoaderIfNecessary(applicationContext);

  // TODO(9577825): remove this
  ApplicationHolder.setApplication((Application) applicationContext.getApplicationContext());
  setDisplayMetrics(applicationContext);

  mApplicationContext = applicationContext;
  mCurrentActivity = currentActivity;
  mDefaultBackButtonImpl = defaultHardwareBackBtnHandler;
  mJSBundleFile = jsBundleFile;
  mJSMainModuleName = jsMainModuleName;
  mPackages = packages;
  mUseDeveloperSupport = useDeveloperSupport;
  mDevSupportManager = DevSupportManagerFactory.create(
      applicationContext,
      mDevInterface,
      mJSMainModuleName,
      useDeveloperSupport);
  mBridgeIdleDebugListener = bridgeIdleDebugListener;
  mLifecycleState = initialLifecycleState;
  mUIImplementationProvider = uiImplementationProvider;
  mMemoryPressureRouter = new MemoryPressureRouter(applicationContext);
  mNativeModuleCallExceptionHandler = nativeModuleCallExceptionHandler;
  mJSCConfig = jscConfig;
}
 
Example 11
Project: Ironman   File: CatalystInstanceImpl.java   View source code 5 votes vote down vote up
private CatalystInstanceImpl(
    final ReactQueueConfigurationSpec ReactQueueConfigurationSpec,
    final JavaScriptExecutor jsExecutor,
    final NativeModuleRegistry registry,
    final JavaScriptModuleRegistry jsModuleRegistry,
    final JSBundleLoader jsBundleLoader,
    NativeModuleCallExceptionHandler nativeModuleCallExceptionHandler) {
  FLog.d(ReactConstants.TAG, "Initializing React Xplat Bridge.");
  mHybridData = initHybrid();

  mReactQueueConfiguration = ReactQueueConfigurationImpl.create(
      ReactQueueConfigurationSpec,
      new NativeExceptionHandler());
  mBridgeIdleListeners = new CopyOnWriteArrayList<>();
  mJavaRegistry = registry;
  mJSModuleRegistry = jsModuleRegistry;
  mJSBundleLoader = jsBundleLoader;
  mNativeModuleCallExceptionHandler = nativeModuleCallExceptionHandler;
  mTraceListener = new JSProfilerTraceListener(this);

  initializeBridge(
    new BridgeCallback(this),
    jsExecutor,
    mReactQueueConfiguration.getJSQueueThread(),
    mReactQueueConfiguration.getNativeModulesQueueThread(),
    mJavaRegistry.getModuleRegistryHolder(this));
  mMainExecutorToken = getMainExecutorToken();
}
 
Example 12
Project: react-native-exceptions-manager   File: ExceptionsManagerModule.java   View source code 5 votes vote down vote up
public ExceptionsManagerModule(ReactApplicationContext reactContext) {
    super(reactContext);
    this.context = reactContext;

    reactContext.setNativeModuleCallExceptionHandler(new NativeModuleCallExceptionHandler() {
        @Override
        public void handleException(Exception e) {
            Intent intent = new Intent();
            intent.setAction("com.richardcao.android.REACT_NATIVE_CRASH_REPORT_ACTION");
            intent.putExtra("Exception", e);
            context.sendBroadcast(intent);
        }
    });
}
 
Example 13
Project: RNLearn_Project1   File: ReactInstanceManager.java   View source code 4 votes vote down vote up
ReactInstanceManager(
  Context applicationContext,
  @Nullable Activity currentActivity,
  @Nullable DefaultHardwareBackBtnHandler defaultHardwareBackBtnHandler,
  @Nullable JSBundleLoader bundleLoader,
  @Nullable String jsMainModuleName,
  List<ReactPackage> packages,
  boolean useDeveloperSupport,
  @Nullable NotThreadSafeBridgeIdleDebugListener bridgeIdleDebugListener,
  LifecycleState initialLifecycleState,
  UIImplementationProvider uiImplementationProvider,
  NativeModuleCallExceptionHandler nativeModuleCallExceptionHandler,
  JSCConfig jscConfig,
  @Nullable RedBoxHandler redBoxHandler,
  boolean lazyNativeModulesEnabled,
  boolean lazyViewManagersEnabled,
  boolean useStartupThread) {

  initializeSoLoaderIfNecessary(applicationContext);

  // TODO(9577825): remove this
  ApplicationHolder.setApplication((Application) applicationContext.getApplicationContext());
  DisplayMetricsHolder.initDisplayMetricsIfNotInitialized(applicationContext);

  mApplicationContext = applicationContext;
  mCurrentActivity = currentActivity;
  mDefaultBackButtonImpl = defaultHardwareBackBtnHandler;
  mBundleLoader = bundleLoader;
  mJSMainModuleName = jsMainModuleName;
  mPackages = packages;
  mUseDeveloperSupport = useDeveloperSupport;
  mDevSupportManager = DevSupportManagerFactory.create(
      applicationContext,
      mDevInterface,
      mJSMainModuleName,
      useDeveloperSupport,
      redBoxHandler);
  mBridgeIdleDebugListener = bridgeIdleDebugListener;
  mLifecycleState = initialLifecycleState;
  mUIImplementationProvider = uiImplementationProvider;
  mMemoryPressureRouter = new MemoryPressureRouter(applicationContext);
  mNativeModuleCallExceptionHandler = nativeModuleCallExceptionHandler;
  mJSCConfig = jscConfig;
  mLazyNativeModulesEnabled = lazyNativeModulesEnabled;
  mLazyViewManagersEnabled = lazyViewManagersEnabled;
  mUseStartupThread = useStartupThread;
}
 
Example 14
Project: RNLearn_Project1   File: ReactInstanceManagerBuilder.java   View source code 4 votes vote down vote up
/**
 * Set the exception handler for all native module calls. If not set, the default
 * {@link DevSupportManager} will be used, which shows a redbox in dev mode and rethrows
 * (crashes the app) in prod mode.
 */
public ReactInstanceManagerBuilder setNativeModuleCallExceptionHandler(
  NativeModuleCallExceptionHandler handler) {
  mNativeModuleCallExceptionHandler = handler;
  return this;
}
 
Example 15
Project: RNLearn_Project1   File: CatalystInstanceImpl.java   View source code 4 votes vote down vote up
public Builder setNativeModuleCallExceptionHandler(
    NativeModuleCallExceptionHandler handler) {
  mNativeModuleCallExceptionHandler = handler;
  return this;
}
 
Example 16
Project: RNLearn_Project1   File: ReactInstanceManager.java   View source code 4 votes vote down vote up
ReactInstanceManager(
  Context applicationContext,
  @Nullable Activity currentActivity,
  @Nullable DefaultHardwareBackBtnHandler defaultHardwareBackBtnHandler,
  @Nullable JSBundleLoader bundleLoader,
  @Nullable String jsMainModuleName,
  List<ReactPackage> packages,
  boolean useDeveloperSupport,
  @Nullable NotThreadSafeBridgeIdleDebugListener bridgeIdleDebugListener,
  LifecycleState initialLifecycleState,
  UIImplementationProvider uiImplementationProvider,
  NativeModuleCallExceptionHandler nativeModuleCallExceptionHandler,
  JSCConfig jscConfig,
  @Nullable RedBoxHandler redBoxHandler,
  boolean lazyNativeModulesEnabled,
  boolean lazyViewManagersEnabled,
  boolean useStartupThread) {

  initializeSoLoaderIfNecessary(applicationContext);

  // TODO(9577825): remove this
  ApplicationHolder.setApplication((Application) applicationContext.getApplicationContext());
  DisplayMetricsHolder.initDisplayMetricsIfNotInitialized(applicationContext);

  mApplicationContext = applicationContext;
  mCurrentActivity = currentActivity;
  mDefaultBackButtonImpl = defaultHardwareBackBtnHandler;
  mBundleLoader = bundleLoader;
  mJSMainModuleName = jsMainModuleName;
  mPackages = packages;
  mUseDeveloperSupport = useDeveloperSupport;
  mDevSupportManager = DevSupportManagerFactory.create(
      applicationContext,
      mDevInterface,
      mJSMainModuleName,
      useDeveloperSupport,
      redBoxHandler);
  mBridgeIdleDebugListener = bridgeIdleDebugListener;
  mLifecycleState = initialLifecycleState;
  mUIImplementationProvider = uiImplementationProvider;
  mMemoryPressureRouter = new MemoryPressureRouter(applicationContext);
  mNativeModuleCallExceptionHandler = nativeModuleCallExceptionHandler;
  mJSCConfig = jscConfig;
  mLazyNativeModulesEnabled = lazyNativeModulesEnabled;
  mLazyViewManagersEnabled = lazyViewManagersEnabled;
  mUseStartupThread = useStartupThread;
}
 
Example 17
Project: RNLearn_Project1   File: ReactInstanceManagerBuilder.java   View source code 4 votes vote down vote up
/**
 * Set the exception handler for all native module calls. If not set, the default
 * {@link DevSupportManager} will be used, which shows a redbox in dev mode and rethrows
 * (crashes the app) in prod mode.
 */
public ReactInstanceManagerBuilder setNativeModuleCallExceptionHandler(
  NativeModuleCallExceptionHandler handler) {
  mNativeModuleCallExceptionHandler = handler;
  return this;
}
 
Example 18
Project: RNLearn_Project1   File: CatalystInstanceImpl.java   View source code 4 votes vote down vote up
public Builder setNativeModuleCallExceptionHandler(
    NativeModuleCallExceptionHandler handler) {
  mNativeModuleCallExceptionHandler = handler;
  return this;
}
 
Example 19
Project: Ironman   File: XReactInstanceManagerImpl.java   View source code 4 votes vote down vote up
XReactInstanceManagerImpl(
  Context applicationContext,
  @Nullable Activity currentActivity,
  @Nullable DefaultHardwareBackBtnHandler defaultHardwareBackBtnHandler,
  @Nullable JSBundleLoader bundleLoader,
  @Nullable String jsMainModuleName,
  List<ReactPackage> packages,
  boolean useDeveloperSupport,
  @Nullable NotThreadSafeBridgeIdleDebugListener bridgeIdleDebugListener,
  LifecycleState initialLifecycleState,
  UIImplementationProvider uiImplementationProvider,
  NativeModuleCallExceptionHandler nativeModuleCallExceptionHandler,
  JSCConfig jscConfig,
  @Nullable RedBoxHandler redBoxHandler,
  boolean lazyNativeModulesEnabled,
  boolean lazyViewManagersEnabled) {

  initializeSoLoaderIfNecessary(applicationContext);

  // TODO(9577825): remove this
  ApplicationHolder.setApplication((Application) applicationContext.getApplicationContext());
  DisplayMetricsHolder.initDisplayMetricsIfNotInitialized(applicationContext);

  mApplicationContext = applicationContext;
  mCurrentActivity = currentActivity;
  mDefaultBackButtonImpl = defaultHardwareBackBtnHandler;
  mBundleLoader = bundleLoader;
  mJSMainModuleName = jsMainModuleName;
  mPackages = packages;
  mUseDeveloperSupport = useDeveloperSupport;
  mDevSupportManager = DevSupportManagerFactory.create(
      applicationContext,
      mDevInterface,
      mJSMainModuleName,
      useDeveloperSupport,
      redBoxHandler);
  mBridgeIdleDebugListener = bridgeIdleDebugListener;
  mLifecycleState = initialLifecycleState;
  mUIImplementationProvider = uiImplementationProvider;
  mMemoryPressureRouter = new MemoryPressureRouter(applicationContext);
  mNativeModuleCallExceptionHandler = nativeModuleCallExceptionHandler;
  mJSCConfig = jscConfig;
  mLazyNativeModulesEnabled = lazyNativeModulesEnabled;
  mLazyViewManagersEnabled = lazyViewManagersEnabled;
}
 
Example 20
Project: Ironman   File: CatalystInstanceImpl.java   View source code 4 votes vote down vote up
public Builder setNativeModuleCallExceptionHandler(
    NativeModuleCallExceptionHandler handler) {
  mNativeModuleCallExceptionHandler = handler;
  return this;
}
 
Example 21
Project: ReactNativeSignatureExample   File: ReactInstanceManager.java   View source code 2 votes vote down vote up
/**
 * Set the exception handler for all native module calls. If not set, the default
 * {@link DevSupportManager} will be used, which shows a redbox in dev mode and rethrows
 * (crashes the app) in prod mode.
 */
public Builder setNativeModuleCallExceptionHandler(NativeModuleCallExceptionHandler handler) {
  mNativeModuleCallExceptionHandler = handler;
  return this;
}
 
Example 22
Project: react-native-ibeacon-android   File: ReactInstanceManager.java   View source code 2 votes vote down vote up
/**
 * Set the exception handler for all native module calls. If not set, the default
 * {@link DevSupportManager} will be used, which shows a redbox in dev mode and rethrows
 * (crashes the app) in prod mode.
 */
public Builder setNativeModuleCallExceptionHandler(NativeModuleCallExceptionHandler handler) {
  mNativeModuleCallExceptionHandler = handler;
  return this;
}
 
Example 23
Project: react-native-box-loaders   File: ReactInstanceManager.java   View source code 2 votes vote down vote up
/**
 * Set the exception handler for all native module calls. If not set, the default
 * {@link DevSupportManager} will be used, which shows a redbox in dev mode and rethrows
 * (crashes the app) in prod mode.
 */
public Builder setNativeModuleCallExceptionHandler(NativeModuleCallExceptionHandler handler) {
  mNativeModuleCallExceptionHandler = handler;
  return this;
}
 
Example 24
Project: Ironman   File: ReactInstanceManager.java   View source code 2 votes vote down vote up
/**
 * Set the exception handler for all native module calls. If not set, the default
 * {@link DevSupportManager} will be used, which shows a redbox in dev mode and rethrows
 * (crashes the app) in prod mode.
 */
public Builder setNativeModuleCallExceptionHandler(NativeModuleCallExceptionHandler handler) {
  mNativeModuleCallExceptionHandler = handler;
  return this;
}