LocusError.fromException constructor
- Object error, [
- StackTrace? stack
Creates from a generic exception.
Implementation
factory LocusError.fromException(Object error, [StackTrace? stack]) {
if (error is LocusError) return error;
return LocusError(
type: LocusErrorType.unknown,
message: error.toString(),
originalError: error,
stackTrace: stack,
);
}