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

Unified Diff: runtime/lib/error.dart

Issue 11235054: Removed IllegalAccessException and UnsupportedOperationException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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: runtime/lib/error.dart
diff --git a/runtime/lib/error.dart b/runtime/lib/error.dart
index 907667ff66602aae2b629d92a9fcdb336a7acd9a..825bbf181b1aa3fab72e6fd9bc6ade7ad693b37c 100644
--- a/runtime/lib/error.dart
+++ b/runtime/lib/error.dart
@@ -6,7 +6,7 @@
class AssertionErrorImplementation implements AssertionError {
factory AssertionErrorImplementation._uninstantiable() {
- throw const UnsupportedOperationException(
+ throw new StateError(
"AssertionError can only be allocated by the VM");
}
static _throwNew(int assertionStart, int assertionEnd)
@@ -25,7 +25,7 @@ class TypeErrorImplementation
extends AssertionErrorImplementation
implements TypeError {
factory TypeErrorImplementation._uninstantiable() {
- throw const UnsupportedOperationException(
+ throw new StateError(
"TypeError can only be allocated by the VM");
}
static _throwNew(int location,
@@ -54,7 +54,7 @@ class CastErrorImplementation
extends TypeErrorImplementation
implements CastError {
factory CastError._uninstantiable() {
- throw const UnsupportedOperationException(
+ throw new StateError(
"CastError can only be allocated by the VM");
}
// A CastError is allocated by TypeError._throwNew() when dst_name equals
@@ -73,7 +73,7 @@ class CastErrorImplementation
class FallThroughErrorImplementation implements FallThroughError {
factory FallThroughErrorImplementation._uninstantiable() {
- throw const UnsupportedOperationException(
+ throw new StateError(
"FallThroughError can only be allocated by the VM");
}
static _throwNew(int case_clause_pos) native "FallThroughError_throwNew";
@@ -94,7 +94,7 @@ class InternalError {
// TODO(regis): This class will change once mirrors are available.
class NoSuchMethodErrorImplementation implements NoSuchMethodError {
factory NoSuchMethodErrorImplementation._uninstantiable() {
- throw const UnsupportedOperationException(
+ throw new StateError(
"NoSuchMethodError can only be allocated by the VM");
}
@@ -116,7 +116,7 @@ class AbstractClassInstantiationErrorImplementation
implements AbstractClassInstantiationError {
factory AbstractClassInstantiationErrorImplementation._uninstantiable() {
- throw const UnsupportedOperationException(
+ throw new StateError(
"AbstractClassInstantiationError can only be allocated by the VM");
}

Powered by Google App Engine
This is Rietveld 408576698