| Index: pkg/stack_trace/lib/src/trace.dart
|
| diff --git a/pkg/stack_trace/lib/src/trace.dart b/pkg/stack_trace/lib/src/trace.dart
|
| index c3db43ecd0eb243f7d092f9ba2de1aaccded502c..3f514430869b4912c39d1e1d3a04264bf7bb0eb9 100644
|
| --- a/pkg/stack_trace/lib/src/trace.dart
|
| +++ b/pkg/stack_trace/lib/src/trace.dart
|
| @@ -172,9 +172,14 @@ class Trace implements StackTrace {
|
| .where((line) => line != '[native code]')
|
| .map((line) => new Frame.parseFirefox(line)));
|
|
|
| - /// Parses this package's a string representation of a stack trace.
|
| + /// Parses this package's string representation of a stack trace.
|
| + ///
|
| + /// This also parses string representations of [Chain]s. They parse to the
|
| + /// same trace that [Chain.toTrace] would return.
|
| Trace.parseFriendly(String trace)
|
| : this(trace.trim().split("\n")
|
| + // Filter out asynchronous gaps from [Chain]s.
|
| + .where((line) => !line.startsWith('====='))
|
| .map((line) => new Frame.parseFriendly(line)));
|
|
|
| /// Returns a new [Trace] comprised of [frames].
|
| @@ -191,10 +196,13 @@ class Trace implements StackTrace {
|
| /// Returns a terser version of [this].
|
| ///
|
| /// This is accomplished by folding together multiple stack frames from the
|
| - /// core library, as in [foldFrames]. Remaining core library frames have their
|
| - /// libraries, "-patch" suffixes, and line numbers removed.
|
| + /// core library or from this package, as in [foldFrames]. Remaining core
|
| + /// library frames have their libraries, "-patch" suffixes, and line numbers
|
| + /// removed.
|
| Trace get terse {
|
| - return new Trace(foldFrames((frame) => frame.isCore).frames.map((frame) {
|
| + return new Trace(foldFrames((frame) {
|
| + return frame.isCore || frame.package == 'stack_trace';
|
| + }).frames.map((frame) {
|
| if (!frame.isCore) return frame;
|
| var library = frame.library.replaceAll(_terseRegExp, '');
|
| return new Frame(Uri.parse(library), null, null, frame.member);
|
|
|