reject

open fun reject(code: String, message: String)

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

Parameters

code

String

message

String


open fun reject(code: String, throwable: Throwable)

Report an exception with a custom code.

Parameters

code

String

throwable

Throwable


open fun reject(code: String, message: String, throwable: Throwable)

Report an exception with a custom code and error message.

Parameters

code

String

message

String

throwable

Throwable


open fun reject(throwable: Throwable)

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

Parameters

throwable

Throwable


open 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.

Parameters

throwable

Throwable

userInfo

WritableMap


open fun reject(code: String, @NonNull userInfo: WritableMap)

Reject with a code and userInfo WritableMap.

Parameters

code

String

userInfo

WritableMap


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

Report an exception with a custom code and userInfo.

Parameters

code

String

throwable

Throwable

userInfo

WritableMap


open fun reject(code: String, message: String, @NonNull userInfo: WritableMap)

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

Parameters

code

String

message

String

userInfo

WritableMap


open fun reject(@Nullable code: String, @Nullable message: String, @Nullable throwable: Throwable, @Nullable userInfo: WritableMap)

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

Parameters

code

String

message

String

throwable

Throwable

userInfo

WritableMap


open fun reject(message: String)

Deprecated

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