diff options
Diffstat (limited to 'runtime/common_throws.cc')
| -rw-r--r-- | runtime/common_throws.cc | 37 |
1 files changed, 4 insertions, 33 deletions
diff --git a/runtime/common_throws.cc b/runtime/common_throws.cc index f7ff15fbfd..19e7f7686d 100644 --- a/runtime/common_throws.cc +++ b/runtime/common_throws.cc @@ -53,11 +53,6 @@ static void AddReferrerLocation(std::ostream& os, ObjPtr<mirror::Class> referrer } } -static void ThrowException(const char* exception_descriptor) REQUIRES_SHARED(Locks::mutator_lock_) { - Thread* self = Thread::Current(); - self->ThrowNewException(exception_descriptor, nullptr); -} - static void ThrowException(const char* exception_descriptor, ObjPtr<mirror::Class> referrer, const char* fmt, @@ -248,11 +243,6 @@ void ThrowIllegalArgumentException(const char* msg) { ThrowException("Ljava/lang/IllegalArgumentException;", nullptr, msg); } -// IllegalStateException - -void ThrowIllegalStateException(const char* msg) { - ThrowException("Ljava/lang/IllegalStateException;", nullptr, msg); -} // IncompatibleClassChangeError @@ -324,13 +314,6 @@ void ThrowIncompatibleClassChangeErrorForMethodConflict(ArtMethod* method) { ArtMethod::PrettyMethod(method).c_str()).c_str()); } -// IndexOutOfBoundsException - -void ThrowIndexOutOfBoundsException(int index, int length) { - ThrowException("Ljava/lang/IndexOutOfBoundsException;", nullptr, - StringPrintf("length=%d; index=%d", length, index).c_str()); -} - // InternalError void ThrowInternalError(const char* fmt, ...) { @@ -736,12 +719,6 @@ void ThrowNullPointerException(const char* msg) { ThrowException("Ljava/lang/NullPointerException;", nullptr, msg); } -// ReadOnlyBufferException - -void ThrowReadOnlyBufferException() { - Thread::Current()->ThrowNewException("Ljava/nio/ReadOnlyBufferException;", nullptr); -} - // RuntimeException void ThrowRuntimeException(const char* fmt, ...) { @@ -865,12 +842,6 @@ void ThrowStringIndexOutOfBoundsException(int index, int length) { StringPrintf("length=%d; index=%d", length, index).c_str()); } -// UnsupportedOperationException - -void ThrowUnsupportedOperationException() { - ThrowException("Ljava/lang/UnsupportedOperationException;"); -} - // VerifyError void ThrowVerifyError(ObjPtr<mirror::Class> referrer, const char* fmt, ...) { @@ -882,13 +853,13 @@ void ThrowVerifyError(ObjPtr<mirror::Class> referrer, const char* fmt, ...) { // WrongMethodTypeException -void ThrowWrongMethodTypeException(mirror::MethodType* expected_type, - mirror::MethodType* actual_type) { +void ThrowWrongMethodTypeException(mirror::MethodType* callee_type, + mirror::MethodType* callsite_type) { ThrowException("Ljava/lang/invoke/WrongMethodTypeException;", nullptr, StringPrintf("Expected %s but was %s", - expected_type->PrettyDescriptor().c_str(), - actual_type->PrettyDescriptor().c_str()).c_str()); + callee_type->PrettyDescriptor().c_str(), + callsite_type->PrettyDescriptor().c_str()).c_str()); } } // namespace art |