UserExceptionAdvancedExtension extension
Properties
-
hardCause
→ Object?
-
The hard cause is some error which caused the UserException, but that is not
a UserException itself. For example:
int.parse('a')
throws a FormatException
.
Then: throw UserException('Invalid number').addCause(FormatException('Invalid input'))
.
will have the FormatException
as the hard cause. Note: If a UserException is
passed as the hard cause, it will be added with addCause, and will not become the
hard cause. In other words, a UserException will never be a hard cause.
no setter
-
onCancel
→ VoidCallback?
-
The
onCancel
callback of the exception, or null
if it was not defined.
no setter
-
onOk
→ VoidCallback?
-
The
onOk
callback of the exception, or null
if it was not defined.
no setter
-
props
→ IMap<String, dynamic>
-
The properties added to the exception, if any.
They are an immutable-map of type
IMap
, of key-value pairs.
To read the properties, use the []
operator, like this:
no setter