More gracefully handle unexpected errors in JS interop

This commit is contained in:
Natalie Weizenbaum 2021-10-12 17:15:30 -07:00
parent 2cf2f27499
commit 1e70242959

View File

@ -182,9 +182,9 @@ T _systemErrorToFileSystemException<T>(T callback()) {
try {
return callback();
} catch (error) {
var systemError = error as JsSystemError;
if (error is! JsSystemError) rethrow;
throw FileSystemException._(
_cleanErrorMessage(systemError), systemError.path);
_cleanErrorMessage(error), error.path);
}
}