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

Unified Diff: runtime/bin/builtin.dart

Issue 1156983003: - Include original, loaded URI in error message. (Closed) Base URL: git@github.com:dart-lang/sdk.git@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 | sdk/lib/_internal/pub/lib/src/barback/transformer_isolate.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/builtin.dart
diff --git a/runtime/bin/builtin.dart b/runtime/bin/builtin.dart
index a6f5da0b555691055977cd666165b6a8fb76d4ab..940556a1acd647494ef13ced93019689835a8d72 100644
--- a/runtime/bin/builtin.dart
+++ b/runtime/bin/builtin.dart
@@ -91,9 +91,10 @@ bool _isWindows = false;
// A class wrapping the load error message in an Error object.
class _LoadError extends Error {
final String message;
- _LoadError(this.message);
+ final String uri;
+ _LoadError(this.uri, this.message);
- String toString() => 'Load Error: $message';
+ String toString() => 'Load Error for "$uri": $message';
}
// Class collecting all of the information about a particular load request.
@@ -280,13 +281,13 @@ void _handleLoaderReply(msg) {
_loadScript(req, dataOrError);
} else {
assert(dataOrError is String);
- var error = new _LoadError(dataOrError.toString());
+ var error = new _LoadError(req._uri, dataOrError.toString());
_asyncLoadError(req, error);
}
} catch(e, s) {
// Wrap inside a _LoadError unless we are already propagating a
// previous _LoadError.
- var error = (e is _LoadError) ? e : new _LoadError(e.toString());
+ var error = (e is _LoadError) ? e : new _LoadError(req._uri, e.toString());
assert(req != null);
_asyncLoadError(req, error);
}
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/barback/transformer_isolate.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698