AdvancedUserException constructor
const
AdvancedUserException(
- String? message, {
- required String? reason,
- required int? code,
- required String? errorText,
- required bool ifOpenDialog,
- required VoidCallback? onOk,
- required VoidCallback? onCancel,
- required Object? hardCause,
- IMap<
String, dynamic> props = const IMapConst<String, dynamic>({}),
Instead of using this constructor directly, prefer doing:
throw UserException('Invalid number', reason: 'Must be less than 42')
.addCallbacks(onOk: () => print('OK'), onCancel: () => print('CANCEL'))
.addCause(FormatException('Invalid input'))
.addProps({'number': 42}));
This constructor is public only so that you can subclass AdvancedUserException.
Implementation
const AdvancedUserException(
super.message, {
required super.reason,
required super.code,
required super.errorText,
required super.ifOpenDialog,
required this.onOk,
required this.onCancel,
required this.hardCause,
this.props = const IMapConst<String, dynamic>({}),
});