Package 

Class PromiseImpl

  • All Implemented Interfaces:
    com.facebook.react.bridge.Promise

    
    public class PromiseImpl
     implements Promise
                        
    • Method Summary

      Modifier and Type Method Description
      void resolve(Object value) Successfully resolve the Promise with an optional value.
      void reject(String code, String message) Report an error without an exception using a custom code and error message.
      void reject(String code, Throwable throwable) Report an exception with a custom code.
      void reject(String code, String message, Throwable throwable) Report an exception with a custom code and error message.
      void reject(Throwable throwable) Report an exception, with default error code.
      void reject(Throwable throwable, WritableMap userInfo) Report an exception, with default error code, with userInfo.
      void reject(String code, @NonNull() WritableMap userInfo) Reject with a code and userInfo WritableMap.
      void reject(String code, Throwable throwable, WritableMap userInfo) Report an exception with a custom code and userInfo.
      void reject(String code, String message, @NonNull() WritableMap userInfo) Report an error with a custom code, error message and userInfo, an error not caused by anexception.
      void reject(@Nullable() String code, @Nullable() String message, @Nullable() Throwable throwable, @Nullable() WritableMap userInfo) Report an exception with a custom code, error message and userInfo.
      void reject(String message) Report an error which wasn't caused by an exception.
      • Methods inherited from class com.facebook.react.bridge.Promise

        reject, resolve
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • resolve

         void resolve(Object value)

        Successfully resolve the Promise with an optional value.

        Parameters:
        value - Object
      • reject

         void reject(String code, String message)

        Report an error without an exception using a custom code and error message.

        Parameters:
        code - String
        message - String
      • reject

         void reject(String code, Throwable throwable)

        Report an exception with a custom code.

        Parameters:
        code - String
        throwable - Throwable
      • reject

         void reject(String code, String message, Throwable throwable)

        Report an exception with a custom code and error message.

        Parameters:
        code - String
        message - String
        throwable - Throwable
      • reject

         void reject(Throwable throwable)

        Report an exception, with default error code. Useful in catch-all scenarios where it's unclearwhy the error occurred.

        Parameters:
        throwable - Throwable
      • reject

         void reject(Throwable throwable, WritableMap userInfo)

        Report an exception, with default error code, with userInfo. Useful in catch-all scenarioswhere it's unclear why the error occurred.

        Parameters:
        throwable - Throwable
        userInfo - WritableMap
      • reject

         void reject(String code, @NonNull() WritableMap userInfo)

        Reject with a code and userInfo WritableMap.

        Parameters:
        code - String
        userInfo - WritableMap
      • reject

         void reject(String code, Throwable throwable, WritableMap userInfo)

        Report an exception with a custom code and userInfo.

        Parameters:
        code - String
        throwable - Throwable
        userInfo - WritableMap
      • reject

         void reject(String code, String message, @NonNull() WritableMap userInfo)

        Report an error with a custom code, error message and userInfo, an error not caused by anexception.

        Parameters:
        code - String
        message - String
        userInfo - WritableMap