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

Side by Side Diff: pkg/barback/lib/src/errors.dart

Issue 23199004: Support passing barback assets through phases in which they're unused. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix a logic error. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/barback/lib/src/barback.dart ('k') | pkg/barback/lib/src/package_graph.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library barback.errors; 5 library barback.errors;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:stack_trace/stack_trace.dart'; 10 import 'package:stack_trace/stack_trace.dart';
(...skipping 11 matching lines...) Expand all
22 } 22 }
23 23
24 /// The interface for exceptions from the barback graph or its transformers. 24 /// The interface for exceptions from the barback graph or its transformers.
25 /// 25 ///
26 /// These exceptions are never produced by programming errors in barback. 26 /// These exceptions are never produced by programming errors in barback.
27 abstract class BarbackException implements Exception {} 27 abstract class BarbackException implements Exception {}
28 28
29 /// Error thrown when two or more transformers both output an asset with [id]. 29 /// Error thrown when two or more transformers both output an asset with [id].
30 class AssetCollisionException implements BarbackException { 30 class AssetCollisionException implements BarbackException {
31 /// All the transforms that output an asset with [id]. 31 /// All the transforms that output an asset with [id].
32 ///
33 /// If this only contains a single transform, that indicates that a
34 /// transformer produced an output that collides with a source asset or an
35 /// asset from a previous phase.
32 final Set<TransformInfo> transforms; 36 final Set<TransformInfo> transforms;
33 final AssetId id; 37 final AssetId id;
34 38
35 AssetCollisionException(Iterable<TransformInfo> transforms, this.id) 39 AssetCollisionException(Iterable<TransformInfo> transforms, this.id)
36 : transforms = new Set.from(transforms); 40 : transforms = new Set.from(transforms);
37 41
38 String toString() => "Transforms $transforms all emitted asset $id."; 42 String toString() => "Transforms $transforms all emitted asset $id.";
39 } 43 }
40 44
41 /// Error thrown when a transformer requests an input [id] which cannot be 45 /// Error thrown when a transformer requests an input [id] which cannot be
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 114
111 bool operator==(other) => 115 bool operator==(other) =>
112 other is TransformInfo && 116 other is TransformInfo &&
113 other.transformer == transformer && 117 other.transformer == transformer &&
114 other.primaryId == primaryId; 118 other.primaryId == primaryId;
115 119
116 int get hashCode => transformer.hashCode ^ primaryId.hashCode; 120 int get hashCode => transformer.hashCode ^ primaryId.hashCode;
117 121
118 String toString() => "$transformer on $primaryId"; 122 String toString() => "$transformer on $primaryId";
119 } 123 }
OLDNEW
« no previous file with comments | « pkg/barback/lib/src/barback.dart ('k') | pkg/barback/lib/src/package_graph.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698