FailureException.nested constructor
FailureException.nested(
- Exception nestedException, [
- StackTrace? nestedStackTrace,
- String? error,
- String? hint,
Simplified factory constructor for a FailureException with a nested exception. If the nested exception is a FailureException it is returned as is.
Implementation
factory FailureException.nested(
final Exception nestedException, [
final StackTrace? nestedStackTrace,
final String? error,
final String? hint,
]) {
if (nestedException is FailureException) {
return nestedException;
}
return FailureException(
error: error,
hint: hint,
nestedException: nestedException,
nestedStackTrace: nestedStackTrace,
);
}