AdvancedUserException constructor

const AdvancedUserException(
  1. String? message, {
  2. required String? reason,
  3. required int? code,
  4. required String? errorText,
  5. required bool ifOpenDialog,
  6. required VoidCallback? onOk,
  7. required VoidCallback? onCancel,
  8. required Object? hardCause,
  9. 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>({}),
});