OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 import 'dart:io'; | 5 import 'dart:io'; |
6 import 'package:analyzer/src/generated/source.dart' show Source; | 6 import 'package:analyzer/src/generated/source.dart' show Source; |
7 import 'package:analyzer/src/summary/package_bundle_reader.dart' | 7 import 'package:analyzer/src/summary/package_bundle_reader.dart' |
8 show InSummarySource; | 8 show InSummarySource; |
9 import 'package:args/args.dart' show ArgParser, ArgResults; | 9 import 'package:args/args.dart' show ArgParser, ArgResults; |
10 import 'package:args/command_runner.dart' show UsageException; | 10 import 'package:args/command_runner.dart' show UsageException; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 } catch (error, stackTrace) { | 61 } catch (error, stackTrace) { |
62 // Anything else is likely a compiler bug. | 62 // Anything else is likely a compiler bug. |
63 // | 63 // |
64 // --unsafe-force-compile is a bit of a grey area, but it's nice not to | 64 // --unsafe-force-compile is a bit of a grey area, but it's nice not to |
65 // crash while compiling | 65 // crash while compiling |
66 // (of course, output code may crash, if it had errors). | 66 // (of course, output code may crash, if it had errors). |
67 // | 67 // |
68 printFn(''' | 68 printFn(''' |
69 We're sorry, you've found a bug in our compiler. | 69 We're sorry, you've found a bug in our compiler. |
70 You can report this bug at: | 70 You can report this bug at: |
71 https://github.com/dart-lang/dev_compiler/issues | 71 https://github.com/dart-lang/sdk/issues/labels/area-dev-compiler |
72 Please include the information below in your report, along with | 72 Please include the information below in your report, along with |
73 any other information that may help us track it down. Thanks! | 73 any other information that may help us track it down. Thanks! |
74 dartdevc arguments: ${args.join(' ')} | 74 dartdevc arguments: ${args.join(' ')} |
75 dart --version: ${Platform.version} | 75 dart --version: ${Platform.version} |
76 ``` | 76 ``` |
77 $error | 77 $error |
78 $stackTrace | 78 $stackTrace |
79 ```'''); | 79 ```'''); |
80 return 70; | 80 return 70; |
81 } | 81 } |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 '\n\n${_argParser.usage}'; | 173 '\n\n${_argParser.usage}'; |
174 | 174 |
175 void _usageException(String message) { | 175 void _usageException(String message) { |
176 throw new UsageException(message, _usageMessage); | 176 throw new UsageException(message, _usageMessage); |
177 } | 177 } |
178 | 178 |
179 /// Thrown when the input source code has errors. | 179 /// Thrown when the input source code has errors. |
180 class CompileErrorException implements Exception { | 180 class CompileErrorException implements Exception { |
181 toString() => '\nPlease fix all errors before compiling (warnings are okay).'; | 181 toString() => '\nPlease fix all errors before compiling (warnings are okay).'; |
182 } | 182 } |
OLD | NEW |