error property
Object
error
Return the error Object of _ErrorWrapper
or throws ErrorOrTypeError
if ErrorOr is not a _ErrorWrapper
.
Implementation
Object get error {
if (this is _ErrorWrapper<T>) {
return (this as _ErrorWrapper<T>)._error;
}
throw ErrorOrTypeError('Check [hasError] before accessing [error]');
}