| Index: lib/compiler/implementation/tools/mini_parser.dart
|
| diff --git a/lib/compiler/implementation/tools/mini_parser.dart b/lib/compiler/implementation/tools/mini_parser.dart
|
| index 3a36b45aaf4eceb39526c0886d93ef15018c40dc..cb39b2c1e925fd4d537ef6c6ab0de7c862f92add 100644
|
| --- a/lib/compiler/implementation/tools/mini_parser.dart
|
| +++ b/lib/compiler/implementation/tools/mini_parser.dart
|
| @@ -99,15 +99,15 @@ void parseFile(String filename, MyOptions options) {
|
| try {
|
| Token token = scan(file);
|
| if (!options.scanOnly) parser.parseUnit(token);
|
| - } catch (ParserError ex) {
|
| + } on ParserError catch (ex) {
|
| if (options.throwOnError) {
|
| throw;
|
| } else {
|
| print(ex);
|
| }
|
| - } catch (MalformedInputException ex) {
|
| + } on MalformedInputException catch (ex) {
|
| // Already diagnosed.
|
| - } catch (var ex) {
|
| + } catch (ex) {
|
| print('Error in file: $filename');
|
| throw;
|
| }
|
| @@ -126,7 +126,7 @@ Token scan(MySourceFile source) {
|
| Scanner scanner = new ByteArrayScanner(source.rawText);
|
| try {
|
| return scanner.tokenize();
|
| - } catch (MalformedInputException ex) {
|
| + } on MalformedInputException catch (ex) {
|
| if (ex.position is Token) {
|
| print(formatError(ex.message, ex.position, ex.position, source));
|
| } else {
|
| @@ -144,7 +144,7 @@ void parseFilesFrom(InputStream input, MyOptions options, Function whenDone) {
|
| stopwatch.start();
|
| try {
|
| parseFile(line, options);
|
| - } catch (var ex, var trace) {
|
| + } catch (ex, trace) {
|
| filesWithCrashes.add(line);
|
| print(ex);
|
| print(trace);
|
| @@ -180,7 +180,7 @@ List<int> read(String filename) {
|
| } finally {
|
| try {
|
| file.closeSync();
|
| - } catch (var ex) {
|
| + } catch (ex) {
|
| if (!threw) throw;
|
| }
|
| }
|
|
|