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

Unified Diff: pkg/analyzer/lib/src/error.dart

Issue 725143004: Format and sort analyzer and analysis_server packages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « pkg/analyzer/lib/src/analyzer_impl.dart ('k') | pkg/analyzer/lib/src/error_formatter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/error.dart
diff --git a/pkg/analyzer/lib/src/error.dart b/pkg/analyzer/lib/src/error.dart
index 6bb5c672276c29d9fab088f2e4b9c6069e7bdc57..60f5cf094676498d083db7fa60fdf0452ab4801f 100644
--- a/pkg/analyzer/lib/src/error.dart
+++ b/pkg/analyzer/lib/src/error.dart
@@ -11,26 +11,6 @@ import 'generated/error.dart';
/// an [AnalyzerError] to a string.
final _MAX_ERROR_LINE_LENGTH = 120;
-/// An error class that collects multiple [AnalyzerError]s that are emitted
-/// during a single analysis.
-class AnalyzerErrorGroup implements Exception {
- /// The errors in this collection.
- List<AnalyzerError> get errors =>
- new UnmodifiableListView<AnalyzerError>(_errors);
- final List<AnalyzerError> _errors;
-
- AnalyzerErrorGroup(Iterable<AnalyzerError> errors)
- : _errors = errors.toList();
-
- /// Creates an [AnalyzerErrorGroup] from a list of lower-level
- /// [AnalysisError]s.
- AnalyzerErrorGroup.fromAnalysisErrors(Iterable<AnalysisError> errors)
- : this(errors.map((e) => new AnalyzerError(e)));
-
- String get message => toString();
- String toString() => errors.join("\n");
-}
-
/// A wrapper around [AnalysisError] that provides a more user-friendly string
/// representation.
class AnalyzerError implements Exception {
@@ -91,3 +71,23 @@ class AnalyzerError implements Exception {
return builder.toString();
}
}
+
+/// An error class that collects multiple [AnalyzerError]s that are emitted
+/// during a single analysis.
+class AnalyzerErrorGroup implements Exception {
+ final List<AnalyzerError> _errors;
+ AnalyzerErrorGroup(Iterable<AnalyzerError> errors)
+ : _errors = errors.toList();
+
+ /// Creates an [AnalyzerErrorGroup] from a list of lower-level
+ /// [AnalysisError]s.
+ AnalyzerErrorGroup.fromAnalysisErrors(Iterable<AnalysisError> errors)
+ : this(errors.map((e) => new AnalyzerError(e)));
+
+ /// The errors in this collection.
+ List<AnalyzerError> get errors =>
+ new UnmodifiableListView<AnalyzerError>(_errors);
+
+ String get message => toString();
+ String toString() => errors.join("\n");
+}
« no previous file with comments | « pkg/analyzer/lib/src/analyzer_impl.dart ('k') | pkg/analyzer/lib/src/error_formatter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698