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

Unified Diff: pkg/front_end/tool/bazel/worker.dart

Issue 3010033002: don't use internal throwOnWarnings option (Closed)
Patch Set: Created 3 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/tool/bazel/worker.dart
diff --git a/pkg/front_end/tool/bazel/worker.dart b/pkg/front_end/tool/bazel/worker.dart
index d7f6adfc2971801d82f2ec8627e591e760f005cd..1dbec8ec4e40ae49ff56f66581131cabcde103c7 100644
--- a/pkg/front_end/tool/bazel/worker.dart
+++ b/pkg/front_end/tool/bazel/worker.dart
@@ -32,7 +32,8 @@ class SummaryWorker extends AsyncWorkerLoop {
try {
await computeSummary(request.arguments,
isWorker: true, outputBuffer: outputBuffer);
- } catch (_, s) {
+ } catch (e, s) {
+ outputBuffer.writeln(e);
outputBuffer.writeln(s);
response.exitCode = 15;
}
@@ -89,17 +90,17 @@ Future computeSummary(List<String> args,
..multiRoots = parsedArgs['multi-root'].map(Uri.parse).toList()
..target = new NoneTarget(new TargetFlags());
- if (outputBuffer != null) {
- options.onError = (CompilationMessage error) {
- var severityString = severityName(error.severity, capitalized: true);
+ options.onError = (CompilationMessage error) {
+ var severityString = severityName(error.severity, capitalized: true);
+ if (outputBuffer != null) {
outputBuffer.writeln('$severityString: ${error.message}');
- if (error.severity != Severity.nit) {
- throw error;
- }
- };
- } else {
- options.throwOnWarningsForDebugging = true;
- }
+ } else {
+ print('$severityString: ${error.message}');
+ }
+ if (error.severity != Severity.nit) {
+ throw error;
Siggi Cherem (dart-lang) 2017/09/01 17:19:08 Instead of throwing here, consider setting a boole
+ }
+ };
var sources = parsedArgs['source'].map(Uri.parse).toList();
var program = await summaryFor(sources, options);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698