summaryrefslogtreecommitdiffstats
path: root/vm/Exception.h
diff options
context:
space:
mode:
authorDan Bornstein <danfuzz@android.com>2011-03-03 16:17:37 -0800
committerDan Bornstein <danfuzz@android.com>2011-03-03 16:18:53 -0800
commita3b3512e99ef51940b0a13e57528bd32803f72b4 (patch)
tree277c6d36741efd16cf7873152f9c1128d714bee1 /vm/Exception.h
parentf78efc044b6e296c7c6378157851091a0083124a (diff)
downloadandroid_dalvik-a3b3512e99ef51940b0a13e57528bd32803f72b4.tar.gz
android_dalvik-a3b3512e99ef51940b0a13e57528bd32803f72b4.tar.bz2
android_dalvik-a3b3512e99ef51940b0a13e57528bd32803f72b4.zip
More exception rework.
This includes banishing dvmThrowExceptionWithClassMessage(), in favor of the "ByClass" version, as well as making the verification error throwing code use class objects. Bug: 3500987 Change-Id: I1d63cec0ffaf3a0ad17e9304ba6a21fe51072fc7
Diffstat (limited to 'vm/Exception.h')
-rw-r--r--vm/Exception.h31
1 files changed, 19 insertions, 12 deletions
diff --git a/vm/Exception.h b/vm/Exception.h
index 6d2743734..ccab18cb2 100644
--- a/vm/Exception.h
+++ b/vm/Exception.h
@@ -83,24 +83,23 @@ INLINE void dvmThrowExceptionFmtByClass(ClassObject* exceptionClass,
}
/*
- * Throw the named exception using the human-readable form of the class
- * descriptor as the exception message, and with the specified cause.
+ * 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 dvmThrowChainedExceptionWithClassMessage(const char* exceptionDescriptor,
- const char* messageDescriptor, Object* cause);
-INLINE void dvmThrowExceptionWithClassMessage(const char* exceptionDescriptor,
- const char* messageDescriptor)
-{
- dvmThrowChainedExceptionWithClassMessage(exceptionDescriptor,
- messageDescriptor, NULL);
-}
+void dvmThrowChainedExceptionByClassWithClassMessage(
+ ClassObject* exceptionClass, const char* messageDescriptor,
+ Object* cause);
/*
* Like dvmThrowException, but take a class object instead of a name
* and turn the given message into the human-readable form for a descriptor.
*/
-void dvmThrowExceptionByClassWithClassMessage(ClassObject* exceptionClass,
- const char* messageDescriptor);
+INLINE void dvmThrowExceptionByClassWithClassMessage(
+ ClassObject* exceptionClass, const char* messageDescriptor)
+{
+ dvmThrowChainedExceptionByClassWithClassMessage(exceptionClass,
+ messageDescriptor, NULL);
+}
/*
* Return the exception being thrown in the current thread, or NULL if
@@ -378,6 +377,14 @@ void dvmThrowNegativeArraySizeException(s4 size);
void dvmThrowNoClassDefFoundError(const char* descriptor);
/**
+ * Throw a NoClassDefFoundError in the current thread, with the given
+ * cause, and the human-readable form of the given descriptor as the
+ * detail message.
+ */
+void dvmThrowChainedNoClassDefFoundError(const char* descriptor,
+ Object* cause);
+
+/**
* Throw a NoSuchFieldError in the current thread, with the given
* detail message.
*/