Invoke either onError with the promise's exception or onSuccess with its value.
Invoke either onError with the promise's exception or onSuccess with its value.
contains function that's executed in case of error
contains function that's executed in case of success
Return the value or the promise, or throw it if it held an exception.
true if the promise has either a value or an exception.
true if the promise has either a value or an exception.
A promise state that contains either a value or an exception.