| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.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 pub.barback.cycle_exception; | |
| 6 | |
| 7 import '../exceptions.dart'; | 5 import '../exceptions.dart'; |
| 8 | 6 |
| 9 /// An exception thrown when a transformer dependency cycle is detected. | 7 /// An exception thrown when a transformer dependency cycle is detected. |
| 10 /// | 8 /// |
| 11 /// A cycle exception is usually produced within a deeply-nested series of | 9 /// A cycle exception is usually produced within a deeply-nested series of |
| 12 /// calls. The API is designed to make it easy for each of these calls to add to | 10 /// calls. The API is designed to make it easy for each of these calls to add to |
| 13 /// the message so that the full reasoning for the cycle is made visible to the | 11 /// the message so that the full reasoning for the cycle is made visible to the |
| 14 /// user. | 12 /// user. |
| 15 /// | 13 /// |
| 16 /// Each call's individual message is called a "step". A [CycleException] is | 14 /// Each call's individual message is called a "step". A [CycleException] is |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 CycleException._(this._step, this._next); | 49 CycleException._(this._step, this._next); |
| 52 | 50 |
| 53 /// Returns a copy of [this] with [step] added to the beginning of [steps]. | 51 /// Returns a copy of [this] with [step] added to the beginning of [steps]. |
| 54 CycleException prependStep(String step) { | 52 CycleException prependStep(String step) { |
| 55 if (_step == null) return new CycleException(step); | 53 if (_step == null) return new CycleException(step); |
| 56 return new CycleException._(step, this); | 54 return new CycleException._(step, this); |
| 57 } | 55 } |
| 58 | 56 |
| 59 String toString() => message; | 57 String toString() => message; |
| 60 } | 58 } |
| OLD | NEW |