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

Unified Diff: pkg/front_end/lib/src/fasta/translate_uri.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
Index: pkg/front_end/lib/src/fasta/translate_uri.dart
diff --git a/pkg/front_end/lib/src/fasta/translate_uri.dart b/pkg/front_end/lib/src/fasta/translate_uri.dart
index 02ff2536672360878bec55e7c86b371c03fb0636..00453c669298d2b26cea22d5a79f55a7018cfdff 100644
--- a/pkg/front_end/lib/src/fasta/translate_uri.dart
+++ b/pkg/front_end/lib/src/fasta/translate_uri.dart
@@ -5,7 +5,6 @@
library fasta.translate_uri;
import 'dart:async' show Future;
-import 'dart:io' show FileSystemException;
import 'package:front_end/file_system.dart';
import 'package:package_config/packages_file.dart' as packages_file show parse;
@@ -101,15 +100,9 @@ class TranslateUri {
List<int> bytes;
try {
- FileSystemException;
bytes = await fileSystem.entityForUri(uri).readAsBytes();
} on FileSystemException catch (e) {
- String message = e.message;
- String osMessage = e.osError?.message;
- if (osMessage != null && osMessage.isNotEmpty) {
- message = osMessage;
- }
- inputError(uri, -1, message);
+ inputError(uri, -1, e.message);
}
Map<String, Uri> packages = const <String, Uri>{};
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/source_loader.dart ('k') | pkg/front_end/test/memory_file_system_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698