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

Side by Side Diff: pkg/barback/lib/src/transformer/transform_logger.dart

Issue 261823008: Reorganize barback's source files. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: re-add barback/lib/src/internal_asset.dart Created 6 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 unified diff | Download patch | Annotate | Revision Log
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.transform_logger; 5 library barback.transformer.transform_logger;
6 6
7 import 'package:source_maps/span.dart'; 7 import 'package:source_maps/span.dart';
8 8
9 import 'asset_id.dart'; 9 import '../asset/asset_id.dart';
10 import 'log.dart'; 10 import '../log.dart';
11 11
12 typedef void LogFunction(AssetId asset, LogLevel level, String message, 12 typedef void LogFunction(AssetId asset, LogLevel level, String message,
13 Span span); 13 Span span);
14 14
15 /// Object used to report warnings and errors encountered while running a 15 /// Object used to report warnings and errors encountered while running a
16 /// transformer. 16 /// transformer.
17 class TransformLogger { 17 class TransformLogger {
18 final LogFunction _logFunction; 18 final LogFunction _logFunction;
19 19
20 TransformLogger(this._logFunction); 20 TransformLogger(this._logFunction);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 /// primary input nor any outputs emitted by the transformer will be passed on 62 /// primary input nor any outputs emitted by the transformer will be passed on
63 /// to the following phase, and the build will be reported as having failed. 63 /// to the following phase, and the build will be reported as having failed.
64 /// 64 ///
65 /// Unlike throwing an exception, this doesn't cause a transformer to stop 65 /// Unlike throwing an exception, this doesn't cause a transformer to stop
66 /// running. This makes it useful in cases where a single input may have 66 /// running. This makes it useful in cases where a single input may have
67 /// multiple errors that the user wants to know about. 67 /// multiple errors that the user wants to know about.
68 void error(String message, {AssetId asset, Span span}) { 68 void error(String message, {AssetId asset, Span span}) {
69 _logFunction(asset, LogLevel.ERROR, message, span); 69 _logFunction(asset, LogLevel.ERROR, message, span);
70 } 70 }
71 } 71 }
OLDNEW
« no previous file with comments | « pkg/barback/lib/src/transformer/transform.dart ('k') | pkg/barback/lib/src/transformer/transformer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698