UserException.debug constructor
UserException.debug(
- String? msg, {
- Object? cause,
- ExceptionCode? code,
- VoidCallback? onOk,
- VoidCallback? onCancel,
Adding .debug
to the constructor will print the exception to the console.
Use this for debugging purposes only.
This constructor is marked as deprecated so that you don't forget to remove it.
Implementation
@deprecated
UserException.debug(this.msg, {this.cause, this.code, VoidCallback? onOk, VoidCallback? onCancel})
: _onOk = onOk,
_onCancel = onCancel {
print("================================================================\n"
"UserException${code == null ? "" : " (code: $code)"}:\n"
"Msg = $msg,\n"
"${cause == null ? "" : "Cause = $cause,\n"}"
"================================================================");
}