UserExceptionAdvancedExtension extension

on

Properties

hardCause → Object?

Available on UserException, provided by the UserExceptionAdvancedExtension extension

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?

Available on UserException, provided by the UserExceptionAdvancedExtension extension

The onCancel callback of the exception, or null if it was not defined.
no setter
onOk → VoidCallback?

Available on UserException, provided by the UserExceptionAdvancedExtension extension

The onOk callback of the exception, or null if it was not defined.
no setter
props → IMap<String, dynamic>

Available on UserException, provided by the UserExceptionAdvancedExtension extension

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

Methods

addCallbacks({VoidCallback? onOk, VoidCallback? onCancel}) → UserException

Available on UserException, provided by the UserExceptionAdvancedExtension extension

Adds callbacks to the UserException.
addCause(Object? cause) → UserException

Available on UserException, provided by the UserExceptionAdvancedExtension extension

Returns a UserException from the current one, by adding the given cause. Note the added cause won't replace the original cause, but will be added to it.
addProps(Map<String, dynamic>? moreProps) → UserException

Available on UserException, provided by the UserExceptionAdvancedExtension extension

Adds moreProps to the properties of the UserException. If the exception already had props, the new moreProps will be merged with those.