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

Unified Diff: lib/src/runner/load_exception.dart

Issue 1163593004: Make LoadException resilient to the new load error format. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 years, 7 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: lib/src/runner/load_exception.dart
diff --git a/lib/src/runner/load_exception.dart b/lib/src/runner/load_exception.dart
index bb34b977ad3c3b1f53eec249984de0d36c158aa6..06068ca4cd0188a395aa14174ac043603ca97783 100644
--- a/lib/src/runner/load_exception.dart
+++ b/lib/src/runner/load_exception.dart
@@ -32,10 +32,19 @@ class LoadException implements Exception {
// If this is a file system error, get rid of both the preamble and the
// useless stack trace.
+
+ // This message was used prior to 1.11.0-dev.3.0.
innerString = innerString.replaceFirst(
"Unhandled exception:\n"
"Uncaught Error: Load Error: ",
"");
+
+ // This message was used after 1.11.0-dev.3.0.
+ innerString = innerString.replaceFirst(
+ "Unhandled exception:\n"
+ "Load Error for ",
+ "");
+
innerString = innerString.replaceFirst("FileSystemException: ", "");
innerString = innerString.split("Stack Trace:\n").first.trim();
} if (innerError is SourceSpanException) {
« 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