Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Unified Diff: pkg/front_end/lib/src/fasta/deprecated_problems.dart

Issue 2979623002: Use messages for (some) public API errors (Closed)
Patch Set: wrap - verification error still pending Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/lib/src/fasta/deprecated_problems.dart
diff --git a/pkg/front_end/lib/src/fasta/deprecated_problems.dart b/pkg/front_end/lib/src/fasta/deprecated_problems.dart
index 084b837e921a95693d295b31a1479e3e389794e3..3c4223c2bb641f1473db13163eefdaf7a70f8f19 100644
--- a/pkg/front_end/lib/src/fasta/deprecated_problems.dart
+++ b/pkg/front_end/lib/src/fasta/deprecated_problems.dart
@@ -15,6 +15,8 @@ import 'colors.dart' show red;
import 'messages.dart' show errorsAreFatal, deprecated_format, isVerbose;
+import 'fasta_codes.dart' show Message, LocatedMessage, Code;
+
const String defaultServerAddress = "http://127.0.0.1:59410/";
/// Tracks if there has been a crash reported through [reportCrash]. Should be
@@ -81,13 +83,23 @@ String colorError(String message) {
return red(message);
}
-class deprecated_InputError {
+class deprecated_InputError implements LocatedMessage {
ahe 2017/07/12 13:14:43 I would like to maintain the invariant that instan
Siggi Cherem (dart-lang) 2017/07/12 21:54:59 Done (removed the implements here)
final Uri uri;
final int charOffset;
final Object error;
+ String get message => safeToString(error);
+
+ Message get messageObject => null;
+
+ Code get code => null;
+
+ Map<String, dynamic> get arguments => {};
+
+ String get tip => null;
+
deprecated_InputError(this.uri, int charOffset, this.error)
: this.charOffset = charOffset ?? -1;

Powered by Google App Engine
This is Rietveld 408576698