| Index: pkg/barback/lib/src/transform_logger.dart
|
| diff --git a/pkg/barback/lib/src/transform_logger.dart b/pkg/barback/lib/src/transform_logger.dart
|
| index c3e5c73fa64c8602ccde0b63016a0d27854976e7..5f43a2dc44c02517d0746f521dee4982ed4f9c6f 100644
|
| --- a/pkg/barback/lib/src/transform_logger.dart
|
| +++ b/pkg/barback/lib/src/transform_logger.dart
|
| @@ -56,7 +56,15 @@ class TransformLogger {
|
| /// Otherwise it's associated with the primary input of [transformer].
|
| /// If present, [span] indicates the location in the input asset that caused
|
| /// the error.
|
| - // TODO(sigmund,nweiz): clarify when an error should be logged or thrown.
|
| + ///
|
| + /// Logging any errors will cause Barback to consider the transformation to
|
| + /// have failed, much like throwing an exception. This means that neither the
|
| + /// primary input nor any outputs emitted by the transformer will be passed on
|
| + /// to the following phase, and the build will be reported as having failed.
|
| + ///
|
| + /// Unlike throwing an exception, this doesn't cause a transformer to stop
|
| + /// running. This makes it useful in cases where a single input may have
|
| + /// multiple errors that the user wants to know about.
|
| void error(String message, {AssetId asset, Span span}) {
|
| _logFunction(asset, LogLevel.ERROR, message, span);
|
| }
|
|
|