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

Side by Side Diff: pkg/front_end/lib/compilation_error.dart

Issue 2979623002: Use messages for (some) public API errors (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// Defines the API for the front end to communicate information about 5 /// Defines the API for the front end to communicate information about
6 /// compilation errors to clients. 6 /// compilation errors to clients.
7 library front_end.compilation_error; 7 library front_end.compilation_error;
8 8
9 import 'package:source_span/source_span.dart' show SourceSpan; 9 import 'package:source_span/source_span.dart' show SourceSpan;
10 10
11 /// A single error that occurred during compilation, and information about where 11 /// A single error that occurred during compilation, and information about where
12 /// it occurred. 12 /// it occurred and how to fix it.
13 /// 13 ///
14 /// TODO(paulberry): add a reference to the analyzer error code. 14 /// TODO(paulberry): add a reference to the analyzer error code.
15 /// 15 ///
16 /// Not intended to be implemented or extended by clients. 16 /// Not intended to be implemented or extended by clients.
17 abstract class CompilationError { 17 abstract class CompilationError {
Siggi Cherem (dart-lang) 2017/07/11 03:57:13 Paul - I like the idea of renaming this to Compila
Paul Berry 2017/07/11 16:00:59 Fine by me :)
ahe 2017/07/12 13:14:43 CompilationProblem?
Siggi Cherem (dart-lang) 2017/07/12 21:54:58 Is it always a problem? Don't we want the compiler
ahe 2017/07/12 23:44:56 CompilationOpportunity? ;-)
ahe 2017/07/13 00:06:03 Comportunity? ;-)
18 /// A text description of how the user can fix the error. May be `null`. 18 /// A text description of the compile error.
19 String get correction; 19 String get message;
20
21 /// A suggestion for the user to hint them on how to fix the error. May be
22 /// `null`.
23 String get tip;
20 24
21 /// The source span where the error occurred. 25 /// The source span where the error occurred.
22 SourceSpan get span; 26 SourceSpan get span;
23
24 /// A text description of the compile error.
25 String get message;
26 } 27 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/kernel_generator.dart » ('j') | pkg/front_end/lib/src/base/processed_options.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698