withoutHardCause method
Returns a deep copy of this exception, but stopping at, and not including, the first cause which is not a UserException.
Implementation
UserException withoutHardCause() => UserException(
msg,
cause: (cause is UserException)
? //
(cause as UserException).withoutHardCause()
: null,
code: code,
onOk: _onOk,
onCancel: _onCancel,
);