| Index: pkg/front_end/lib/src/fasta/errors.dart
|
| diff --git a/pkg/front_end/lib/src/fasta/errors.dart b/pkg/front_end/lib/src/fasta/errors.dart
|
| index 624d8f0fc5ffa66c2cf67e01366ab49f9b80dad6..9e4399dcd84f88a95f5f17dad15a3a416baf5322 100644
|
| --- a/pkg/front_end/lib/src/fasta/errors.dart
|
| +++ b/pkg/front_end/lib/src/fasta/errors.dart
|
| @@ -20,6 +20,9 @@ import 'dart:io' show
|
| import 'colors.dart' show
|
| red;
|
|
|
| +import 'util/relativize.dart' show
|
| + relativizeUri;
|
| +
|
| const String defaultServerAddress = "http://127.0.0.1:59410/";
|
|
|
| /// Tracks if there has been a crash reported through [reportCrash]. Should be
|
| @@ -56,13 +59,8 @@ class InputError {
|
| // Windows.
|
| String message = red("Error: ${safeToString(error)}");
|
| if (uri != null) {
|
| - String uri = "${this.uri}";
|
| - String base = "${Uri.base}";
|
| - if (uri.startsWith(base)) {
|
| - uri = uri.substring(base.length);
|
| - }
|
| String position = charOffset == -1 ? "" : "$charOffset:";
|
| - return "${uri}:$position $message";
|
| + return "${relativizeUri(uri)}:$position $message";
|
| } else {
|
| return message;
|
| }
|
|
|