OLD | NEW |
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 part of dart.core; | 5 part of dart.core; |
6 | 6 |
7 /** | 7 /** |
8 * An interface implemented by all stack trace objects. | 8 * An interface implemented by all stack trace objects. |
9 * | 9 * |
10 * A [StackTrace] is intended to convey information to the user about the call | 10 * A [StackTrace] is intended to convey information to the user about the call |
11 * sequence that triggered an exception. | 11 * sequence that triggered an exception. |
12 * | 12 * |
13 * These objects are created by the runtime, it is not possible to create | 13 * These objects are created by the runtime, it is not possible to create |
14 * them programmatically. | 14 * them programmatically. |
15 */ | 15 */ |
16 abstract class StackTrace { | 16 abstract class StackTrace { |
17 StackTrace(); // In case existing classes extend StackTrace. | 17 StackTrace(); // In case existing classes extend StackTrace. |
18 | 18 |
19 /** | 19 /** |
20 * Create a `StackTrace` object from [stackTraceString]. | 20 * Create a `StackTrace` object from [stackTraceString]. |
21 * | 21 * |
22 * The created stack trace will have a `toString` method returning | 22 * The created stack trace will have a `toString` method returning |
23 * `stackTraceString`. | 23 * `stackTraceString`. |
24 * | 24 * |
25 * The `stackTraceString` can be a string returned by some other | 25 * The `stackTraceString` can be a string returned by some other |
26 * stack trace, or it can be any string at all. | 26 * stack trace, or it can be any string at all. |
27 * If the string doesn't look like a stack trace, code that interprets | 27 * If the string doesn't look like a stack trace, code that interprets |
(...skipping 23 matching lines...) Expand all Loading... |
51 * The exact format of the string representation is not final. | 51 * The exact format of the string representation is not final. |
52 */ | 52 */ |
53 String toString(); | 53 String toString(); |
54 } | 54 } |
55 | 55 |
56 class _StringStackTrace implements StackTrace { | 56 class _StringStackTrace implements StackTrace { |
57 final String _stackTrace; | 57 final String _stackTrace; |
58 _StringStackTrace(this._stackTrace); | 58 _StringStackTrace(this._stackTrace); |
59 String toString() => _stackTrace; | 59 String toString() => _stackTrace; |
60 } | 60 } |
OLD | NEW |