Promise

interface Promise

Inheritors

Functions

Link copied to clipboard
abstract fun reject(message: String)

Report an error which wasn't caused by an exception.

abstract fun reject(throwable: Throwable)

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

abstract fun reject(code: String, userInfo: WritableMap)

Reject with a code and userInfo WritableMap.

abstract fun reject(code: String, message: String?)

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

abstract fun reject(code: String, throwable: Throwable?)

Report an exception with a custom code.

abstract fun reject(throwable: Throwable, userInfo: WritableMap)

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

abstract fun reject(code: String, message: String?, userInfo: WritableMap)

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

abstract fun reject(code: String, message: String?, throwable: Throwable?)

Report an exception with a custom code and error message.

abstract fun reject(code: String, throwable: Throwable?, userInfo: WritableMap)

Report an exception with a custom code and userInfo.

abstract fun reject(code: String?, message: String?, throwable: Throwable?, userInfo: WritableMap?)

Report an exception with a custom code, error message and userInfo.

Link copied to clipboard
abstract fun resolve(value: Any?)

Successfully resolve the Promise with an optional value.