getError method
Implementation
Exception getError([Object? ex]) {
Exception? e = _ex;
if (ex == null) {
_ex = null;
} else {
// ignore: avoid_as
_ex = ex as Exception;
}
/// Return the stored error if any.
e ??= _ex;
return e!;
}