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

Unified Diff: pkg/docgen/lib/docgen.dart

Issue 18237002: Failing gracefully (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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/docgen/lib/docgen.dart
diff --git a/pkg/docgen/lib/docgen.dart b/pkg/docgen/lib/docgen.dart
index af8540b49827aadeb237727fce58a822b80ea6e9..70f6ea3a7c9b2eafe20b2066297cd26bdb256798 100644
--- a/pkg/docgen/lib/docgen.dart
+++ b/pkg/docgen/lib/docgen.dart
@@ -182,7 +182,15 @@ Future<MirrorSystem> _getMirrorSystemHelper(List<String> libraries,
});
return dart2js.analyze(librariesUri, libraryUri, packageUri,
provider.readStringFromUri, diagnosticHandler,
- ['--preserve-comments', '--categories=Client,Server']);
+ ['--preserve-comments', '--categories=Client,Server'])
+ ..catchError((error) {
+ logger.severe('Error: Failed to create mirror system. ');
+ // TODO(janicejl): Use the stack trace package when bug is resolved.
+ // Currently, a string is thrown when it fails to create a mirror
+ // system, and it is not possible to use the stack trace. BUG(#11622)
+ // To avoid printing the stack trace.
+ exit(1);
+ });
}
/**
« 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