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

Unified Diff: lib/compiler/implementation/dart2js.dart

Issue 10891022: Update corelib/ and lib/ to use the new try-catch syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 | « lib/compiler/implementation/compiler.dart ('k') | lib/compiler/implementation/lib/isolate_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/dart2js.dart
diff --git a/lib/compiler/implementation/dart2js.dart b/lib/compiler/implementation/dart2js.dart
index 6fb246b62758c9fa16ac053814a76660deb75987..8c25d8809708f087b3aff7815c47f43cfc924df3 100644
--- a/lib/compiler/implementation/dart2js.dart
+++ b/lib/compiler/implementation/dart2js.dart
@@ -161,7 +161,7 @@ void compile(List<String> argv) {
String source;
try {
source = readAll(uriPathToNative(uri.path));
- } catch (FileIOException ex) {
+ } on FileIOException catch (ex) {
throw 'Error: Cannot read "${relativize(cwd, uri)}" (${ex.osError}).';
}
dartBytesRead += source.length;
@@ -368,10 +368,10 @@ void helpAndFail(String message) {
void main() {
try {
compilerMain(new Options());
- } catch (var exception, var trace) {
+ } catch (exception, trace) {
try {
print('Internal error: $exception');
- } catch (var ignored) {
+ } catch (ignored) {
print('Internal error: error while printing exception');
}
try {
« no previous file with comments | « lib/compiler/implementation/compiler.dart ('k') | lib/compiler/implementation/lib/isolate_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698