Rename some of the exception functions.
Since the there is no longer a "ByClass" vs. not distinction, remove
all the "ByClass"es.
Bug: 3500987
Change-Id: I6bdaf5a31e8166b47c333dbbb394dc811f321c5d
diff --git a/vm/Exception.c b/vm/Exception.c
index 44f4c70..c26af02 100644
--- a/vm/Exception.c
+++ b/vm/Exception.c
@@ -99,16 +99,16 @@
static bool initException(Object* exception, const char* msg, Object* cause,
Thread* self);
-void dvmThrowExceptionFmtByClassV(ClassObject* exceptionClass,
+void dvmThrowExceptionFmtV(ClassObject* exceptionClass,
const char* fmt, va_list args)
{
char msgBuf[512];
vsnprintf(msgBuf, sizeof(msgBuf), fmt, args);
- dvmThrowChainedExceptionByClass(exceptionClass, msgBuf, NULL);
+ dvmThrowChainedException(exceptionClass, msgBuf, NULL);
}
-void dvmThrowChainedExceptionByClass(ClassObject* excepClass, const char* msg,
+void dvmThrowChainedException(ClassObject* excepClass, const char* msg,
Object* cause)
{
Thread* self = dvmThreadSelf();
@@ -130,7 +130,7 @@
excepClass->descriptor);
if (strcmp(excepClass->descriptor, "Ljava/lang/InternalError;") == 0)
dvmAbort();
- dvmThrowChainedExceptionByClass(gDvm.exInternalError,
+ dvmThrowChainedException(gDvm.exInternalError,
"failed to init original exception class", cause);
return;
}
@@ -184,13 +184,13 @@
dvmReleaseTrackedAlloc(exception, self);
}
-void dvmThrowChainedExceptionByClassWithClassMessage(
+void dvmThrowChainedExceptionWithClassMessage(
ClassObject* exceptionClass, const char* messageDescriptor,
Object* cause)
{
char* message = dvmDescriptorToName(messageDescriptor);
- dvmThrowChainedExceptionByClass(exceptionClass, message, cause);
+ dvmThrowChainedException(exceptionClass, message, cause);
free(message);
}
@@ -371,7 +371,7 @@
excepClass->descriptor, msg, initKind);
assert(strcmp(excepClass->descriptor,
"Ljava/lang/RuntimeException;") != 0);
- dvmThrowChainedExceptionByClass(gDvm.exRuntimeException,
+ dvmThrowChainedException(gDvm.exRuntimeException,
"re-throw on exception class missing constructor", NULL);
goto bail;
}
@@ -1203,16 +1203,16 @@
}
void dvmThrowAbstractMethodError(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exAbstractMethodError, msg);
+ dvmThrowException(gDvm.exAbstractMethodError, msg);
}
void dvmThrowArithmeticException(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exArithmeticException, msg);
+ dvmThrowException(gDvm.exArithmeticException, msg);
}
void dvmThrowArrayIndexOutOfBoundsException(int index, int length)
{
- dvmThrowExceptionFmtByClass(gDvm.exArrayIndexOutOfBoundsException,
+ dvmThrowExceptionFmt(gDvm.exArrayIndexOutOfBoundsException,
"length=%d; index=%d", length, index);
}
@@ -1226,7 +1226,7 @@
{
char* actualClassName = dvmHumanReadableDescriptor(actual->descriptor);
char* desiredClassName = dvmHumanReadableDescriptor(desired->descriptor);
- dvmThrowExceptionFmtByClass(exceptionClass, fmt,
+ dvmThrowExceptionFmt(exceptionClass, fmt,
actualClassName, desiredClassName);
free(desiredClassName);
free(actualClassName);
@@ -1246,22 +1246,22 @@
}
void dvmThrowClassCircularityError(const char* descriptor) {
- dvmThrowExceptionByClassWithClassMessage(gDvm.exClassCircularityError,
+ dvmThrowExceptionWithClassMessage(gDvm.exClassCircularityError,
descriptor);
}
void dvmThrowClassFormatError(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exClassFormatError, msg);
+ dvmThrowException(gDvm.exClassFormatError, msg);
}
void dvmThrowClassNotFoundException(const char* name) {
// TODO: Should the name be converted into human-readable form?
- dvmThrowExceptionByClass(gDvm.exClassNotFoundException, name);
+ dvmThrowException(gDvm.exClassNotFoundException, name);
}
void dvmThrowChainedClassNotFoundException(const char* name, Object* cause) {
// TODO: Should the name be converted into human-readable form?
- dvmThrowChainedExceptionByClass(gDvm.exClassNotFoundException, name,
+ dvmThrowChainedException(gDvm.exClassNotFoundException, name,
cause);
}
@@ -1294,58 +1294,58 @@
dvmAddTrackedAlloc(exception, self);
dvmClearException(self);
- dvmThrowChainedExceptionByClass(gDvm.exExceptionInInitializerError,
+ dvmThrowChainedException(gDvm.exExceptionInInitializerError,
NULL, exception);
dvmReleaseTrackedAlloc(exception, self);
}
void dvmThrowFileNotFoundException(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exFileNotFoundException, msg);
+ dvmThrowException(gDvm.exFileNotFoundException, msg);
}
void dvmThrowIOException(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exIOException, msg);
+ dvmThrowException(gDvm.exIOException, msg);
}
void dvmThrowIllegalAccessException(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exIllegalAccessException, msg);
+ dvmThrowException(gDvm.exIllegalAccessException, msg);
}
void dvmThrowIllegalAccessError(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exIllegalAccessError, msg);
+ dvmThrowException(gDvm.exIllegalAccessError, msg);
}
void dvmThrowIllegalArgumentException(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exIllegalArgumentException, msg);
+ dvmThrowException(gDvm.exIllegalArgumentException, msg);
}
void dvmThrowIllegalMonitorStateException(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exIllegalMonitorStateException, msg);
+ dvmThrowException(gDvm.exIllegalMonitorStateException, msg);
}
void dvmThrowIllegalStateException(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exIllegalStateException, msg);
+ dvmThrowException(gDvm.exIllegalStateException, msg);
}
void dvmThrowIllegalThreadStateException(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exIllegalThreadStateException, msg);
+ dvmThrowException(gDvm.exIllegalThreadStateException, msg);
}
void dvmThrowIncompatibleClassChangeError(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exIncompatibleClassChangeError, msg);
+ dvmThrowException(gDvm.exIncompatibleClassChangeError, msg);
}
void dvmThrowIncompatibleClassChangeErrorWithClassMessage(
const char* descriptor)
{
- dvmThrowExceptionByClassWithClassMessage(
+ dvmThrowExceptionWithClassMessage(
gDvm.exIncompatibleClassChangeError, descriptor);
}
void dvmThrowInstantiationException(ClassObject* clazz,
const char* extraDetail) {
char* className = dvmHumanReadableDescriptor(clazz->descriptor);
- dvmThrowExceptionFmtByClass(gDvm.exInstantiationException,
+ dvmThrowExceptionFmt(gDvm.exInstantiationException,
"can't instantiate class %s%s%s", className,
(extraDetail == NULL) ? "" : "; ",
(extraDetail == NULL) ? "" : extraDetail);
@@ -1353,90 +1353,90 @@
}
void dvmThrowInternalError(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exInternalError, msg);
+ dvmThrowException(gDvm.exInternalError, msg);
}
void dvmThrowInterruptedException(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exInterruptedException, msg);
+ dvmThrowException(gDvm.exInterruptedException, msg);
}
void dvmThrowLinkageError(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exLinkageError, msg);
+ dvmThrowException(gDvm.exLinkageError, msg);
}
void dvmThrowNegativeArraySizeException(s4 size) {
- dvmThrowExceptionFmtByClass(gDvm.exNegativeArraySizeException, "%d", size);
+ dvmThrowExceptionFmt(gDvm.exNegativeArraySizeException, "%d", size);
}
void dvmThrowNoClassDefFoundError(const char* descriptor) {
- dvmThrowExceptionByClassWithClassMessage(gDvm.exNoClassDefFoundError,
+ dvmThrowExceptionWithClassMessage(gDvm.exNoClassDefFoundError,
descriptor);
}
void dvmThrowChainedNoClassDefFoundError(const char* descriptor,
Object* cause) {
- dvmThrowChainedExceptionByClassWithClassMessage(
+ dvmThrowChainedExceptionWithClassMessage(
gDvm.exNoClassDefFoundError, descriptor, cause);
}
void dvmThrowNoSuchFieldError(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exNoSuchFieldError, msg);
+ dvmThrowException(gDvm.exNoSuchFieldError, msg);
}
void dvmThrowNoSuchFieldException(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exNoSuchFieldException, msg);
+ dvmThrowException(gDvm.exNoSuchFieldException, msg);
}
void dvmThrowNoSuchMethodError(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exNoSuchMethodError, msg);
+ dvmThrowException(gDvm.exNoSuchMethodError, msg);
}
void dvmThrowNullPointerException(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exNullPointerException, msg);
+ dvmThrowException(gDvm.exNullPointerException, msg);
}
void dvmThrowOutOfMemoryError(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exOutOfMemoryError, msg);
+ dvmThrowException(gDvm.exOutOfMemoryError, msg);
}
void dvmThrowRuntimeException(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exRuntimeException, msg);
+ dvmThrowException(gDvm.exRuntimeException, msg);
}
void dvmThrowStaleDexCacheError(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exStaleDexCacheError, msg);
+ dvmThrowException(gDvm.exStaleDexCacheError, msg);
}
void dvmThrowStringIndexOutOfBoundsExceptionWithIndex(jsize stringLength,
jsize requestIndex) {
- dvmThrowExceptionFmtByClass(gDvm.exStringIndexOutOfBoundsException,
+ dvmThrowExceptionFmt(gDvm.exStringIndexOutOfBoundsException,
"length=%d; index=%d", stringLength, requestIndex);
}
void dvmThrowStringIndexOutOfBoundsExceptionWithRegion(jsize stringLength,
jsize requestStart, jsize requestLength) {
- dvmThrowExceptionFmtByClass(gDvm.exStringIndexOutOfBoundsException,
+ dvmThrowExceptionFmt(gDvm.exStringIndexOutOfBoundsException,
"length=%d; regionStart=%d regionLength=%d",
stringLength, requestStart, requestLength);
}
void dvmThrowTypeNotPresentException(const char* descriptor) {
- dvmThrowExceptionByClassWithClassMessage(gDvm.exTypeNotPresentException,
+ dvmThrowExceptionWithClassMessage(gDvm.exTypeNotPresentException,
descriptor);
}
void dvmThrowUnsatisfiedLinkError(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exUnsatisfiedLinkError, msg);
+ dvmThrowException(gDvm.exUnsatisfiedLinkError, msg);
}
void dvmThrowUnsupportedOperationException(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exUnsupportedOperationException, msg);
+ dvmThrowException(gDvm.exUnsupportedOperationException, msg);
}
void dvmThrowVerifyError(const char* descriptor) {
- dvmThrowExceptionByClassWithClassMessage(gDvm.exVerifyError, descriptor);
+ dvmThrowExceptionWithClassMessage(gDvm.exVerifyError, descriptor);
}
void dvmThrowVirtualMachineError(const char* msg) {
- dvmThrowExceptionByClass(gDvm.exVirtualMachineError, msg);
+ dvmThrowException(gDvm.exVirtualMachineError, msg);
}
diff --git a/vm/Exception.h b/vm/Exception.h
index d447591..2653e76 100644
--- a/vm/Exception.h
+++ b/vm/Exception.h
@@ -38,51 +38,51 @@
* the initial class and then we can't find NoClassDefFoundError. We have
* to handle this case.
*/
-void dvmThrowChainedExceptionByClass(ClassObject* exceptionClass,
+void dvmThrowChainedException(ClassObject* exceptionClass,
const char* msg, Object* cause);
-INLINE void dvmThrowExceptionByClass(ClassObject* exceptionClass,
+INLINE void dvmThrowException(ClassObject* exceptionClass,
const char* msg)
{
- dvmThrowChainedExceptionByClass(exceptionClass, msg, NULL);
+ dvmThrowChainedException(exceptionClass, msg, NULL);
}
/*
- * Like dvmThrowExceptionByClass, but takes printf-style args for the message.
+ * Like dvmThrowException, but takes printf-style args for the message.
*/
-void dvmThrowExceptionFmtByClassV(ClassObject* exceptionClass,
+void dvmThrowExceptionFmtV(ClassObject* exceptionClass,
const char* fmt, va_list args);
-void dvmThrowExceptionFmtByClass(ClassObject* exceptionClass,
+void dvmThrowExceptionFmt(ClassObject* exceptionClass,
const char* fmt, ...)
#if defined(__GNUC__)
__attribute__ ((format(printf, 2, 3)))
#endif
;
-INLINE void dvmThrowExceptionFmtByClass(ClassObject* exceptionClass,
+INLINE void dvmThrowExceptionFmt(ClassObject* exceptionClass,
const char* fmt, ...)
{
va_list args;
va_start(args, fmt);
- dvmThrowExceptionFmtByClassV(exceptionClass, fmt, args);
+ dvmThrowExceptionFmtV(exceptionClass, fmt, args);
va_end(args);
}
/*
- * Like dvmThrowChainedExceptionByClass, but take a class object
+ * Like dvmThrowChainedException, but take a class object
* instead of a name and turn the given message into the
* human-readable form for a descriptor.
*/
-void dvmThrowChainedExceptionByClassWithClassMessage(
+void dvmThrowChainedExceptionWithClassMessage(
ClassObject* exceptionClass, const char* messageDescriptor,
Object* cause);
/*
- * Like dvmThrowExceptionByClass, but take a class object instead of a name
+ * Like dvmThrowException, but take a class object instead of a name
* and turn the given message into the human-readable form for a descriptor.
*/
-INLINE void dvmThrowExceptionByClassWithClassMessage(
+INLINE void dvmThrowExceptionWithClassMessage(
ClassObject* exceptionClass, const char* messageDescriptor)
{
- dvmThrowChainedExceptionByClassWithClassMessage(exceptionClass,
+ dvmThrowChainedExceptionWithClassMessage(exceptionClass,
messageDescriptor, NULL);
}
diff --git a/vm/Jni.c b/vm/Jni.c
index 4a95467..46aeb10 100644
--- a/vm/Jni.c
+++ b/vm/Jni.c
@@ -1973,7 +1973,7 @@
JNI_ENTER();
ClassObject* clazz = (ClassObject*) dvmDecodeIndirectRef(env, jclazz);
- dvmThrowExceptionByClass(clazz, message);
+ dvmThrowException(clazz, message);
// TODO: should return failure if this didn't work (e.g. OOM)
JNI_EXIT();
@@ -2351,7 +2351,7 @@
} else if (dvmIsInterfaceClass(clazz)) {
Method* meth = dvmFindInterfaceMethodHierByDescriptor(clazz, name, sig);
if (meth == NULL) {
- dvmThrowExceptionFmtByClass(gDvm.exNoSuchMethodError,
+ dvmThrowExceptionFmt(gDvm.exNoSuchMethodError,
"no method with name='%s' signature='%s' in interface %s",
name, sig, clazz->descriptor);
}
@@ -2372,7 +2372,7 @@
meth = NULL;
}
if (meth == NULL) {
- dvmThrowExceptionFmtByClass(gDvm.exNoSuchMethodError,
+ dvmThrowExceptionFmt(gDvm.exNoSuchMethodError,
"no method with name='%s' signature='%s' in class %s",
name, sig, clazz->descriptor);
} else {
@@ -2407,7 +2407,7 @@
} else {
id = (jfieldID) dvmFindInstanceFieldHier(clazz, name, sig);
if (id == NULL) {
- dvmThrowExceptionFmtByClass(gDvm.exNoSuchFieldError,
+ dvmThrowExceptionFmt(gDvm.exNoSuchFieldError,
"no field with name='%s' signature='%s' in class %s",
name, sig, clazz->descriptor);
}
@@ -2449,7 +2449,7 @@
id = (jmethodID) meth;
if (id == NULL) {
- dvmThrowExceptionFmtByClass(gDvm.exNoSuchMethodError,
+ dvmThrowExceptionFmt(gDvm.exNoSuchMethodError,
"no static method with name='%s' signature='%s' in class %s",
name, sig, clazz->descriptor);
}
@@ -2476,7 +2476,7 @@
} else {
id = (jfieldID) dvmFindStaticField(clazz, name, sig);
if (id == NULL) {
- dvmThrowExceptionFmtByClass(gDvm.exNoSuchFieldError,
+ dvmThrowExceptionFmt(gDvm.exNoSuchFieldError,
"no static field with name='%s' signature='%s' in class %s",
name, sig, clazz->descriptor);
}
@@ -3210,7 +3210,7 @@
static void throwArrayRegionOutOfBounds(ArrayObject* arrayObj, jsize start,
jsize len, const char* arrayIdentifier)
{
- dvmThrowExceptionFmtByClass(gDvm.exArrayIndexOutOfBoundsException,
+ dvmThrowExceptionFmt(gDvm.exArrayIndexOutOfBoundsException,
"%s offset=%d length=%d %s.length=%d",
arrayObj->obj.clazz->descriptor, start, len, arrayIdentifier,
arrayObj->length);
diff --git a/vm/Profile.c b/vm/Profile.c
index d3cbf63..dcdd602 100644
--- a/vm/Profile.c
+++ b/vm/Profile.c
@@ -359,7 +359,7 @@
int err = errno;
LOGE("Unable to open trace file '%s': %s\n",
traceFileName, strerror(err));
- dvmThrowExceptionFmtByClass(gDvm.exRuntimeException,
+ dvmThrowExceptionFmt(gDvm.exRuntimeException,
"Unable to open trace file '%s': %s",
traceFileName, strerror(err));
goto fail;
@@ -636,7 +636,7 @@
int err = errno;
LOGE("trace fwrite(%d) failed: %s\n",
finalCurOffset, strerror(err));
- dvmThrowExceptionFmtByClass(gDvm.exRuntimeException,
+ dvmThrowExceptionFmt(gDvm.exRuntimeException,
"Trace data write failed: %s", strerror(err));
}
}
diff --git a/vm/Thread.c b/vm/Thread.c
index 8861dff..dab6172 100644
--- a/vm/Thread.c
+++ b/vm/Thread.c
@@ -1418,7 +1418,7 @@
char* threadName = dvmCreateCstrFromString(nameStr);
bool profilerThread = strcmp(threadName, "SamplingProfiler") == 0;
if (!profilerThread) {
- dvmThrowExceptionFmtByClass(gDvm.exIllegalStateException,
+ dvmThrowExceptionFmt(gDvm.exIllegalStateException,
"No new threads in -Xzygote mode. "
"Found thread named '%s'", threadName);
diff --git a/vm/interp/Interp.c b/vm/interp/Interp.c
index a145034..71eeecb 100644
--- a/vm/interp/Interp.c
+++ b/vm/interp/Interp.c
@@ -1206,7 +1206,7 @@
/* no default clause -- want warning if enum updated */
}
- dvmThrowExceptionByClass(exceptionClass, msg);
+ dvmThrowException(exceptionClass, msg);
free(msg);
}
diff --git a/vm/interp/Stack.c b/vm/interp/Stack.c
index e7bfb68..84984a1 100644
--- a/vm/interp/Stack.c
+++ b/vm/interp/Stack.c
@@ -645,7 +645,7 @@
char* actualClassName = (arg != NULL)
? dvmHumanReadableDescriptor(arg->obj.clazz->descriptor)
: strdup("null");
- dvmThrowExceptionFmtByClass(gDvm.exIllegalArgumentException,
+ dvmThrowExceptionFmt(gDvm.exIllegalArgumentException,
"argument %d should have type %s, got %s",
argIndex + 1, expectedClassName, actualClassName);
free(expectedClassName);
@@ -681,7 +681,7 @@
else
argListLength = 0;
if (argListLength != (int) params->length) {
- dvmThrowExceptionFmtByClass(gDvm.exIllegalArgumentException,
+ dvmThrowExceptionFmt(gDvm.exIllegalArgumentException,
"wrong number of arguments; expected %d, got %d",
params->length, argListLength);
return NULL;
@@ -1064,7 +1064,7 @@
LOGW("Stack overflow while throwing exception\n");
dvmClearException(self);
}
- dvmThrowChainedExceptionByClass(gDvm.exStackOverflowError, NULL, excep);
+ dvmThrowChainedException(gDvm.exStackOverflowError, NULL, excep);
}
/*
diff --git a/vm/mterp/c/OP_NEW_INSTANCE.c b/vm/mterp/c/OP_NEW_INSTANCE.c
index 65a8cf7..155434f 100644
--- a/vm/mterp/c/OP_NEW_INSTANCE.c
+++ b/vm/mterp/c/OP_NEW_INSTANCE.c
@@ -32,7 +32,7 @@
* Verifier now tests for interface/abstract class.
*/
//if (dvmIsInterfaceClass(clazz) || dvmIsAbstractClass(clazz)) {
- // dvmThrowExceptionByClassWithClassMessage(gDvm.exInstantiationError,
+ // dvmThrowExceptionWithClassMessage(gDvm.exInstantiationError,
// clazz->descriptor);
// GOTO_exceptionThrown();
//}
diff --git a/vm/mterp/c/OP_NEW_INSTANCE_JUMBO.c b/vm/mterp/c/OP_NEW_INSTANCE_JUMBO.c
index 6cb27b8..2464b69 100644
--- a/vm/mterp/c/OP_NEW_INSTANCE_JUMBO.c
+++ b/vm/mterp/c/OP_NEW_INSTANCE_JUMBO.c
@@ -32,7 +32,7 @@
* Verifier now tests for interface/abstract class.
*/
//if (dvmIsInterfaceClass(clazz) || dvmIsAbstractClass(clazz)) {
- // dvmThrowExceptionByClassWithClassMessage(gDvm.exInstantiationError,
+ // dvmThrowExceptionWithClassMessage(gDvm.exInstantiationError,
// clazz->descriptor);
// GOTO_exceptionThrown();
//}
diff --git a/vm/mterp/out/InterpC-allstubs.c b/vm/mterp/out/InterpC-allstubs.c
index 5d94cef..fdc20aa 100644
--- a/vm/mterp/out/InterpC-allstubs.c
+++ b/vm/mterp/out/InterpC-allstubs.c
@@ -1802,7 +1802,7 @@
* Verifier now tests for interface/abstract class.
*/
//if (dvmIsInterfaceClass(clazz) || dvmIsAbstractClass(clazz)) {
- // dvmThrowExceptionByClassWithClassMessage(gDvm.exInstantiationError,
+ // dvmThrowExceptionWithClassMessage(gDvm.exInstantiationError,
// clazz->descriptor);
// GOTO_exceptionThrown();
//}
@@ -3276,7 +3276,7 @@
* Verifier now tests for interface/abstract class.
*/
//if (dvmIsInterfaceClass(clazz) || dvmIsAbstractClass(clazz)) {
- // dvmThrowExceptionByClassWithClassMessage(gDvm.exInstantiationError,
+ // dvmThrowExceptionWithClassMessage(gDvm.exInstantiationError,
// clazz->descriptor);
// GOTO_exceptionThrown();
//}
diff --git a/vm/mterp/out/InterpC-portdbg.c b/vm/mterp/out/InterpC-portdbg.c
index e2b8e67..1310926 100644
--- a/vm/mterp/out/InterpC-portdbg.c
+++ b/vm/mterp/out/InterpC-portdbg.c
@@ -2165,7 +2165,7 @@
* Verifier now tests for interface/abstract class.
*/
//if (dvmIsInterfaceClass(clazz) || dvmIsAbstractClass(clazz)) {
- // dvmThrowExceptionByClassWithClassMessage(gDvm.exInstantiationError,
+ // dvmThrowExceptionWithClassMessage(gDvm.exInstantiationError,
// clazz->descriptor);
// GOTO_exceptionThrown();
//}
@@ -3639,7 +3639,7 @@
* Verifier now tests for interface/abstract class.
*/
//if (dvmIsInterfaceClass(clazz) || dvmIsAbstractClass(clazz)) {
- // dvmThrowExceptionByClassWithClassMessage(gDvm.exInstantiationError,
+ // dvmThrowExceptionWithClassMessage(gDvm.exInstantiationError,
// clazz->descriptor);
// GOTO_exceptionThrown();
//}
diff --git a/vm/mterp/out/InterpC-portstd.c b/vm/mterp/out/InterpC-portstd.c
index 8204e48..dd91e25 100644
--- a/vm/mterp/out/InterpC-portstd.c
+++ b/vm/mterp/out/InterpC-portstd.c
@@ -1915,7 +1915,7 @@
* Verifier now tests for interface/abstract class.
*/
//if (dvmIsInterfaceClass(clazz) || dvmIsAbstractClass(clazz)) {
- // dvmThrowExceptionByClassWithClassMessage(gDvm.exInstantiationError,
+ // dvmThrowExceptionWithClassMessage(gDvm.exInstantiationError,
// clazz->descriptor);
// GOTO_exceptionThrown();
//}
@@ -3389,7 +3389,7 @@
* Verifier now tests for interface/abstract class.
*/
//if (dvmIsInterfaceClass(clazz) || dvmIsAbstractClass(clazz)) {
- // dvmThrowExceptionByClassWithClassMessage(gDvm.exInstantiationError,
+ // dvmThrowExceptionWithClassMessage(gDvm.exInstantiationError,
// clazz->descriptor);
// GOTO_exceptionThrown();
//}
diff --git a/vm/native/InternalNative.c b/vm/native/InternalNative.c
index 726c391..49e0c08 100644
--- a/vm/native/InternalNative.c
+++ b/vm/native/InternalNative.c
@@ -169,7 +169,7 @@
char* actualClassName = (obj != NULL)
? dvmHumanReadableDescriptor(obj->clazz->descriptor)
: strdup("null");
- dvmThrowExceptionFmtByClass(exceptionClass,
+ dvmThrowExceptionFmt(exceptionClass,
"expected receiver of type %s, but got %s",
expectedClassName, actualClassName);
free(expectedClassName);
diff --git a/vm/native/dalvik_system_VMDebug.c b/vm/native/dalvik_system_VMDebug.c
index 36460e9..d511a8f 100644
--- a/vm/native/dalvik_system_VMDebug.c
+++ b/vm/native/dalvik_system_VMDebug.c
@@ -280,7 +280,7 @@
fd = dup(origFd);
if (fd < 0) {
- dvmThrowExceptionFmtByClass(gDvm.exRuntimeException,
+ dvmThrowExceptionFmt(gDvm.exRuntimeException,
"dup(%d) failed: %s", origFd, strerror(errno));
RETURN_VOID();
}
diff --git a/vm/native/java_lang_System.c b/vm/native/java_lang_System.c
index c3e7a80..5402a7b 100644
--- a/vm/native/java_lang_System.c
+++ b/vm/native/java_lang_System.c
@@ -136,7 +136,7 @@
/* make sure it's an array */
if (!dvmIsArray(srcArray) || !dvmIsArray(dstArray)) {
- dvmThrowExceptionFmtByClass(gDvm.exArrayStoreException,
+ dvmThrowExceptionFmt(gDvm.exArrayStoreException,
"source and destination must be arrays, but were %s and %s",
((Object*)srcArray)->clazz->descriptor,
((Object*)dstArray)->clazz->descriptor);
@@ -148,7 +148,7 @@
srcPos > (int) srcArray->length - length ||
dstPos > (int) dstArray->length - length)
{
- dvmThrowExceptionFmtByClass(gDvm.exArrayIndexOutOfBoundsException,
+ dvmThrowExceptionFmt(gDvm.exArrayIndexOutOfBoundsException,
"src.length=%d srcPos=%d dst.length=%d dstPos=%d length=%d",
srcArray->length, srcPos, dstArray->length, dstPos, length);
RETURN_VOID();
@@ -167,7 +167,7 @@
dstPrim = (dstType != '[' && dstType != 'L');
if (srcPrim || dstPrim) {
if (srcPrim != dstPrim || srcType != dstType) {
- dvmThrowExceptionFmtByClass(gDvm.exArrayStoreException,
+ dvmThrowExceptionFmt(gDvm.exArrayStoreException,
"source and destination arrays are incompatible: %s and %s",
srcClass->descriptor, dstClass->descriptor);
RETURN_VOID();
@@ -283,7 +283,7 @@
copyCount * width);
dvmWriteBarrierArray(dstArray, 0, copyCount);
if (copyCount != length) {
- dvmThrowExceptionFmtByClass(gDvm.exArrayStoreException,
+ dvmThrowExceptionFmt(gDvm.exArrayStoreException,
"source[%d] of type %s cannot be stored in destination array of type %s",
copyCount, srcObj[copyCount]->clazz->descriptor,
dstClass->descriptor);
diff --git a/vm/oo/Array.c b/vm/oo/Array.c
index 0a47caa..33b0f97 100644
--- a/vm/oo/Array.c
+++ b/vm/oo/Array.c
@@ -51,9 +51,8 @@
size_t totalSize = elementSize + headerSize;
if (elementSize >> elementShift != length || totalSize < elementSize) {
char *descriptor = dvmHumanReadableDescriptor(arrayClass->descriptor);
- dvmThrowExceptionFmtByClass(gDvm.exOutOfMemoryError,
- "%s of length %zd exceeds the VM limit",
- descriptor, length);
+ dvmThrowExceptionFmt(gDvm.exOutOfMemoryError,
+ "%s of length %zd exceeds the VM limit", descriptor, length);
free(descriptor);
return NULL;
}
diff --git a/vm/oo/Class.c b/vm/oo/Class.c
index 358067e..d763aee 100644
--- a/vm/oo/Class.c
+++ b/vm/oo/Class.c
@@ -3716,7 +3716,7 @@
if (clazz->verifyErrorClass == NULL) {
dvmThrowNoClassDefFoundError(clazz->descriptor);
} else {
- dvmThrowExceptionByClassWithClassMessage(clazz->verifyErrorClass,
+ dvmThrowExceptionWithClassMessage(clazz->verifyErrorClass,
clazz->descriptor);
}
}