| Index: sdk/lib/_internal/compiler/implementation/util/util.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/util/util.dart b/sdk/lib/_internal/compiler/implementation/util/util.dart
|
| index 2638fd84173295ccfd875579754940fb7ea10795..c904cc14e5e50159ac919fb0ded55c27cf8dc8d5 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/util/util.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/util/util.dart
|
| @@ -77,6 +77,11 @@ class _StackTraceLine {
|
|
|
| _StackTraceLine(this.index, this.file, this.lineNo,
|
| this.columnNo, this.method);
|
| +
|
| + String toString() {
|
| + return 'index=$index, file=$file, '
|
| + 'lineNo=$lineNo, columnNo=$columnNo, method=$method';
|
| + }
|
| }
|
|
|
| // TODO(johnniwinther): Use this format for --throw-on-error.
|
| @@ -123,14 +128,31 @@ String prettifyStackTrace(StackTrace s,
|
| int lastColon = line.lastIndexOf(':', rightParenPos);
|
| int nextToLastColon = line.lastIndexOf(':', lastColon-1);
|
|
|
| - String lineNo = line.substring(nextToLastColon+1, lastColon);
|
| + String lineNo;
|
| + String columnNo;
|
| + if (nextToLastColon != -1) {
|
| + lineNo = line.substring(nextToLastColon+1, lastColon);
|
| + columnNo = line.substring(lastColon+1, rightParenPos);
|
| + try {
|
| + int.parse(lineNo);
|
| + } on FormatException catch (e) {
|
| + lineNo = columnNo;
|
| + columnNo = '';
|
| + nextToLastColon = lastColon;
|
| + }
|
| + } else {
|
| + lineNo = line.substring(lastColon+1, rightParenPos);
|
| + columnNo = '';
|
| + nextToLastColon = lastColon;
|
| + }
|
| +
|
| if (lineNo.length > maxLineNoLength) {
|
| maxLineNoLength = lineNo.length;
|
| }
|
| - String columnNo = line.substring(lastColon+1, rightParenPos);
|
| if (columnNo.length > maxColumnNoLength) {
|
| maxColumnNoLength = columnNo.length;
|
| }
|
| +
|
| String file = line.substring(leftParenPos+1, nextToLastColon);
|
| if (filePrefix != null && file.startsWith(filePrefix)) {
|
| file = file.substring(filePrefix.length);
|
|
|