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

Unified Diff: pkg/barback/lib/src/asset_cascade.dart

Issue 22961002: Add more metadata to non-programmatic barback exceptions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Small fix Created 7 years, 4 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 | pkg/barback/lib/src/asset_node.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/barback/lib/src/asset_cascade.dart
diff --git a/pkg/barback/lib/src/asset_cascade.dart b/pkg/barback/lib/src/asset_cascade.dart
index 2ffe4892394e85df13856793d97664ecbe3fcb34..af48a47cb5e10809280a985f21cb3b99ddac1602 100644
--- a/pkg/barback/lib/src/asset_cascade.dart
+++ b/pkg/barback/lib/src/asset_cascade.dart
@@ -66,13 +66,13 @@ class AssetCascade {
///
/// This will not emit programming errors from barback itself. Those will be
/// emitted through the [results] stream's error channel.
- Stream get errors => _errorsController.stream;
- final _errorsController = new StreamController.broadcast();
+ Stream<BarbackException> get errors => _errorsController.stream;
+ final _errorsController = new StreamController<BarbackException>.broadcast();
/// The errors that have occurred since the current build started.
///
/// This will be empty if no build is occurring.
- Queue _accumulatedErrors;
+ Queue<BarbackException> _accumulatedErrors;
/// A future that completes when the currently running build process finishes.
///
@@ -188,7 +188,7 @@ class AssetCascade {
}).then((asset) {
var controller = _sourceControllerMap[id].setAvailable(asset);
}).catchError((error) {
- reportError(error);
+ reportError(new AssetLoadException(id, error));
// TODO(nweiz): propagate error information through asset nodes.
_sourceControllerMap.remove(id).setRemoved();
@@ -208,7 +208,7 @@ class AssetCascade {
});
}
- void reportError(error) {
+ void reportError(BarbackException error) {
_accumulatedErrors.add(error);
_errorsController.add(error);
}
« no previous file with comments | « no previous file | pkg/barback/lib/src/asset_node.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698