FailureException constructor

FailureException({
  1. String? error,
  2. Iterable<String>? errors,
  3. String? hint,
  4. String? reason,
  5. Exception? nestedException,
  6. StackTrace? nestedStackTrace,
})

Creates a FailureException.

Provide user-friendly error messages and hints if possible.

Provide a reason and causing exception if available which aids in testing and debugging.

Implementation

FailureException({
  final String? error,
  final Iterable<String>? errors,
  this.hint,
  this.reason,
  this.nestedException,
  this.nestedStackTrace,
})  : errors = [if (error != null) error, ...?errors],
      super.error();