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

Unified Diff: pkg/analyzer/lib/src/generated/java_core.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/analyzer/lib/src/generated/java_core.dart
diff --git a/pkg/analyzer/lib/src/generated/java_core.dart b/pkg/analyzer/lib/src/generated/java_core.dart
index 81f9c00021d6a5222202ae21ef5a8432e43c1680..59e904e50c15ee15d3e9daacad7d71f9ba940c71 100644
--- a/pkg/analyzer/lib/src/generated/java_core.dart
+++ b/pkg/analyzer/lib/src/generated/java_core.dart
@@ -86,8 +86,7 @@ String _printf(String fmt, List args) {
continue;
}
// unknown
- throw new IllegalArgumentException(
- '[$fmt][$i] = 0x${c.toRadixString(16)}');
+ throw new ArgumentError('[$fmt][$i] = 0x${c.toRadixString(16)}');
} else {
sb.writeCharCode(c);
}
@@ -130,7 +129,7 @@ class Character {
static String toChars(int codePoint) {
if (codePoint < 0 || codePoint > MAX_CODE_POINT) {
- throw new IllegalArgumentException();
+ throw new ArgumentError();
}
if (codePoint < MIN_SUPPLEMENTARY_CODE_POINT) {
return new String.fromCharCode(codePoint);
@@ -154,15 +153,6 @@ abstract class Enum<E extends Enum> implements Comparable<E> {
String toString() => name;
}
-class IllegalArgumentException extends JavaException {
Brian Wilkerson 2016/09/08 22:38:57 Should we deprecate these instead of deleting them
scheglov 2016/09/08 22:48:13 Fortunately almost nobody uses these removed class
- IllegalArgumentException([message = "", cause = null])
- : super(message, cause);
-}
-
-class IllegalStateException extends JavaException {
- IllegalStateException([message = ""]) : super(message);
-}
-
class JavaArrays {
static int makeHashCode(List a) {
// TODO(rnystrom): This is not used by analyzer, but is called by
@@ -178,18 +168,6 @@ class JavaArrays {
}
}
-class JavaException implements Exception {
- final String message;
- final Object cause;
- JavaException([this.message = "", this.cause = null]);
- JavaException.withCause(this.cause) : message = null;
- String toString() => "$runtimeType: $message $cause";
-}
-
-class JavaIOException extends JavaException {
- JavaIOException([message = "", cause = null]) : super(message, cause);
-}
-
class JavaPatternMatcher {
Iterator<Match> _matches;
Match _match;
@@ -237,26 +215,6 @@ class JavaSystem {
}
}
-class MissingFormatArgumentException implements Exception {
- final String s;
-
- MissingFormatArgumentException(this.s);
-
- String toString() => "MissingFormatArgumentException: $s";
-}
-
-class NoSuchElementException extends JavaException {
- String toString() => "NoSuchElementException";
-}
-
-class NotImplementedException extends JavaException {
- NotImplementedException(message) : super(message);
-}
-
-class NumberFormatException extends JavaException {
- String toString() => "NumberFormatException";
-}
-
class PrintStringWriter extends PrintWriter {
final StringBuffer _sb = new StringBuffer();
@@ -284,19 +242,6 @@ abstract class PrintWriter {
}
}
-class RuntimeException extends JavaException {
- RuntimeException({String message: "", Exception cause: null})
- : super(message, cause);
-}
-
-class StringIndexOutOfBoundsException extends JavaException {
- StringIndexOutOfBoundsException(int index) : super('$index');
-}
-
-class UnsupportedOperationException extends JavaException {
- UnsupportedOperationException([message = ""]) : super(message);
-}
-
class URISyntaxException implements Exception {
final String message;
URISyntaxException(this.message);

Powered by Google App Engine
This is Rietveld 408576698