summaryrefslogtreecommitdiffstats
path: root/vm/Exception.h
diff options
context:
space:
mode:
authorDan Bornstein <danfuzz@android.com>2011-03-16 12:10:17 -0700
committerDan Bornstein <danfuzz@android.com>2011-03-16 12:37:32 -0700
commit61f4c7e40b885ccb0a55d9553f07a888469621dc (patch)
tree8e1e6dab4d2b4baaac0370c0bd50974d922d2c42 /vm/Exception.h
parent044879d39f7fee2b2b62259ae04abfa331504b03 (diff)
downloadandroid_dalvik-61f4c7e40b885ccb0a55d9553f07a888469621dc.tar.gz
android_dalvik-61f4c7e40b885ccb0a55d9553f07a888469621dc.tar.bz2
android_dalvik-61f4c7e40b885ccb0a55d9553f07a888469621dc.zip
Clean up ArrayStoreException some more.
Each of the four variants thrown by the VM now has a descriptively-named function defined in Exception.c, and the messages uniformly use human-oriented class names instead of the internal "[[Lfoo/bar/Baz;" forms. Bug: 3500987 Change-Id: I747315e36005c6d352116ce6a8af9d49c622f59a
Diffstat (limited to 'vm/Exception.h')
-rw-r--r--vm/Exception.h29
1 files changed, 27 insertions, 2 deletions
diff --git a/vm/Exception.h b/vm/Exception.h
index 3022e0484..5da77272b 100644
--- a/vm/Exception.h
+++ b/vm/Exception.h
@@ -221,9 +221,34 @@ void dvmThrowArrayIndexOutOfBoundsException(int length, int index);
/*
* Throw an ArrayStoreException in the current thread, using the given classes'
- * names in the detail message.
+ * names in the detail message, indicating that an object of the given type
+ * can't be stored into an array of the given type.
+ */
+void dvmThrowArrayStoreExceptionIncompatibleElement(ClassObject* objectType,
+ ClassObject* arrayType);
+
+/*
+ * Throw an ArrayStoreException in the current thread, using the given
+ * class name and argument label in the detail message, indicating
+ * that it is not an array.
+ */
+void dvmThrowArrayStoreExceptionNotArray(ClassObject* actual, const char* label);
+
+/*
+ * Throw an ArrayStoreException in the current thread, using the given
+ * classes' names in the detail message, indicating that the arrays
+ * aren't compatible (for copying contents).
+ */
+void dvmThrowArrayStoreExceptionIncompatibleArrays(ClassObject* source, ClassObject* destination);
+
+/*
+ * Throw an ArrayStoreException in the current thread, using the given
+ * index and classes' names in the detail message, indicating that the
+ * object at the given index and of the given type cannot be stored
+ * into an array of the given type.
*/
-void dvmThrowArrayStoreException(ClassObject* actual, ClassObject* desired);
+void dvmThrowArrayStoreExceptionIncompatibleArrayElement(s4 index, ClassObject* objectType,
+ ClassObject* arrayType);
/**
* Throw a ClassCastException in the current thread, using the given classes'