File tree Expand file tree Collapse file tree 5 files changed +5
-23
lines changed
Expand file tree Collapse file tree 5 files changed +5
-23
lines changed Original file line number Diff line number Diff line change @@ -77,8 +77,7 @@ class Chain implements StackTrace {
7777 };
7878 }
7979
80- // TODO(rnystrom): Remove this cast if runZoned() gets a generic type.
81- return runZoned (callback, onError: newOnError) as dynamic /*=T*/ ;
80+ return runZoned (callback, onError: newOnError);
8281 }
8382
8483 var spec = new StackZoneSpecification (onError);
@@ -207,7 +206,7 @@ class Chain implements StackTrace {
207206 // padding is consistent across all traces.
208207 return traces.map ((trace) {
209208 return trace.frames.map ((frame) {
210- return '${padRight ( frame .location , longest )} ${frame .member }\n ' ;
209+ return '${frame .location . padRight ( longest )} ${frame .member }\n ' ;
211210 }).join ();
212211 }).join (chainGap);
213212 }
Original file line number Diff line number Diff line change @@ -291,7 +291,7 @@ class Trace implements StackTrace {
291291 // Print out the stack trace nicely formatted.
292292 return frames.map ((frame) {
293293 if (frame is UnparsedFrame ) return "$frame \n " ;
294- return '${padRight ( frame .location , longest )} ${frame .member }\n ' ;
294+ return '${frame .location . padRight ( longest )} ${frame .member }\n ' ;
295295 }).join ();
296296 }
297297}
Original file line number Diff line number Diff line change 22// for details. All rights reserved. Use of this source code is governed by a
33// BSD-style license that can be found in the LICENSE file.
44
5- import 'package:path/path.dart' as p;
6-
75/// The line used in the string representation of stack chains to represent
86/// the gap between traces.
97const chainGap = '===== asynchronous gap ===========================\n ' ;
108
119// TODO(nweiz): When cross-platform imports work, use them to set this.
1210/// Whether we're running in a JS context.
1311final bool inJS = 0.0 is int ;
14-
15- /// Returns [string] with enough spaces added to the end to make it [length]
16- /// characters long.
17- String padRight (String string, int length) {
18- if (string.length >= length) return string;
19-
20- var result = new StringBuffer ();
21- result.write (string);
22- for (var i = 0 ; i < length - string.length; i++ ) {
23- result.write (' ' );
24- }
25-
26- return result.toString ();
27- }
Original file line number Diff line number Diff line change 33// BSD-style license that can be found in the LICENSE file.
44
55import 'frame.dart' ;
6- import 'utils.dart' ;
76
87/// An implementation of [StackTrace] that emulates the behavior of the VM's
98/// implementation.
@@ -19,7 +18,7 @@ class VMTrace implements StackTrace {
1918 String toString () {
2019 var i = 1 ;
2120 return frames.map ((frame) {
22- var number = padRight ( "#${i ++}" , 8 );
21+ var number = "#${i ++}" . padRight ( 8 );
2322 var member = frame.member
2423 .replaceAllMapped (new RegExp (r"[^.]+\.<async>" ),
2524 (match) => "${match [1 ]}.<${match [1 ]}_async_body>" )
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ name: stack_trace
77#
88# When the major version is upgraded, you *must* update that version constraint
99# in pub to stay in sync with this.
10- version : 1.6.7
10+ version : 1.6.8-dev
1111author :
" Dart Team <[email protected] >" 1212homepage : https://github.com/dart-lang/stack_trace
1313description : >
You can’t perform that action at this time.
0 commit comments