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

The following are top voted examples for showing how to use com.facebook.react.bridge.NoSuchKeyException. 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: RNLearn_Project1   File: CatalystNativeJSToJavaParametersTestCase.java   View source code 5 votes vote down vote up
private void assertNoSuchKeyExceptionThrown(
    ReadableMap map,
    String key,
    String typeToAskFor) {
  boolean gotException = false;
  try {
    mapGetByType(map, key, typeToAskFor);
  } catch (NoSuchKeyException expected) {
    gotException = true;
  }

  assertTrue(gotException);
}
 
Example 2
Project: RNLearn_Project1   File: CatalystNativeJSToJavaParametersTestCase.java   View source code 5 votes vote down vote up
private void assertNoSuchKeyExceptionThrown(
    ReadableMap map,
    String key,
    String typeToAskFor) {
  boolean gotException = false;
  try {
    mapGetByType(map, key, typeToAskFor);
  } catch (NoSuchKeyException expected) {
    gotException = true;
  }

  assertTrue(gotException);
}
 
Example 3
Project: Ironman   File: CatalystNativeJSToJavaParametersTestCase.java   View source code 5 votes vote down vote up
private void assertNoSuchKeyExceptionThrown(
    ReadableMap map,
    String key,
    String typeToAskFor) {
  boolean gotException = false;
  try {
    mapGetByType(map, key, typeToAskFor);
  } catch (NoSuchKeyException expected) {
    gotException = true;
  }

  assertTrue(gotException);
}
 
Example 4
Project: react-native-update   File: Utils.java   View source code 5 votes vote down vote up
public static String tryGetString(ReadableMap map, String key) {
    try {
        return map.getString(key);
    } catch (NoSuchKeyException e) {
        return null;
    }
}