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

Unified Diff: pkg/analysis_server/test/completion_test_support.dart

Issue 2326813002: Replace and remove JavaException(s). (Closed)
Patch Set: Created 4 years, 3 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/analysis_server/test/completion_test_support.dart
diff --git a/pkg/analysis_server/test/completion_test_support.dart b/pkg/analysis_server/test/completion_test_support.dart
index c2fb7a1e2836f5939efd12293f00fe6fedb8cd71..1ef8e4c9e9e227e6250a2ff57211550ae7ed9b44 100644
--- a/pkg/analysis_server/test/completion_test_support.dart
+++ b/pkg/analysis_server/test/completion_test_support.dart
@@ -151,18 +151,18 @@ class LocationSpec {
modifiedSource.substring(index + n);
}
if (modifiedSource == originalSource) {
- throw new IllegalStateException("No tests in source: " + originalSource);
+ throw new StateError("No tests in source: " + originalSource);
}
for (String result in validationStrings) {
if (result.length < 3) {
- throw new IllegalStateException("Invalid location result: " + result);
+ throw new StateError("Invalid location result: " + result);
}
String id = result.substring(0, 1);
String sign = result.substring(1, 2);
String value = result.substring(2);
LocationSpec test = tests[id];
if (test == null) {
- throw new IllegalStateException(
+ throw new StateError(
"Invalid location result id: $id for: $result");
}
test.source = modifiedSource;
@@ -172,7 +172,7 @@ class LocationSpec {
test.negativeResults.add(value);
} else {
String err = "Invalid location result sign: $sign for: $result";
- throw new IllegalStateException(err);
+ throw new StateError(err);
}
}
List<String> badPoints = <String>[];
@@ -200,7 +200,7 @@ class LocationSpec {
err..write(' ')..write(ch);
}
}
- throw new IllegalStateException(err.toString());
+ throw new StateError(err.toString());
}
return tests.values.toList();
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/context/context.dart » ('j') | pkg/analyzer/lib/src/dart/constant/value.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698