UserExceptionAdvancedExtension extension
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 aFormatException. Then:throw UserException('Invalid number').addCause(FormatException('Invalid input')). will have theFormatExceptionas 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
TheonCancelcallback of the exception, ornullif it was not defined.no setter - onOk → VoidCallback?
-
Available on UserException, provided by the UserExceptionAdvancedExtension extension
TheonOkcallback of the exception, ornullif 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 typeIMap, 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 givencause. Note the addedcausewon'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
AddsmorePropsto the properties of the UserException. If the exception already had props, the newmorePropswill be merged with those.