Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(942)

Unified Diff: pkg/front_end/lib/src/fasta/source/source_loader.dart

Issue 2864183002: Throw FileSystemException from FileSystemEntity methods. (Closed)
Patch Set: Use OS error message if available. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/front_end/lib/physical_file_system.dart ('k') | pkg/front_end/lib/src/fasta/translate_uri.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/source/source_loader.dart
diff --git a/pkg/front_end/lib/src/fasta/source/source_loader.dart b/pkg/front_end/lib/src/fasta/source/source_loader.dart
index c538715b36d4bf56c3f23e2e41b8cbcdbf175900..a83e6bb3d7aa4b37bc9679a8096a8a29c1d0f7ba 100644
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart
@@ -6,7 +6,6 @@ library fasta.source_loader;
import 'dart:async' show Future;
-import 'dart:io';
import 'dart:typed_data' show Uint8List;
import 'package:front_end/file_system.dart';
@@ -92,13 +91,7 @@ class SourceLoader<L> extends Loader<L> {
bytes = zeroTerminatedBytes;
sourceBytes[uri] = bytes;
} on FileSystemException catch (e) {
- // TODO(scheglov) Throw and catch abstract file-system exceptions.
- String message = e.message;
- String osMessage = e.osError?.message;
- if (osMessage != null && osMessage.isNotEmpty) {
- message = osMessage;
- }
- return inputError(uri, -1, message);
+ return inputError(uri, -1, e.message);
}
}
« no previous file with comments | « pkg/front_end/lib/physical_file_system.dart ('k') | pkg/front_end/lib/src/fasta/translate_uri.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698