UnknownException constructor

UnknownException({
  1. required Object source,
  2. StackTrace? stackTrace,
  3. Object? error,
  4. String message = '',
})

Creates a new UnknownException with an optional error message.

Optionally, a stackTrace and an error revealing the true nature of the failure. The Error.stackTrace, if any, is considered as fallback if stackTrace is provided.

Implementation

UnknownException({
  required Object source,
  StackTrace? stackTrace,
  this.error,
  String message = '',
})  : stackTrace = stackTrace ?? (error is Error ? error.stackTrace : null),
      super._(message, source);