diff options
| author | 2012-01-17 13:47:13 -0800 | |
|---|---|---|
| committer | 2012-01-17 13:47:13 -0800 | |
| commit | 81aa5b312a843faf8f20e777cb49b2e5d278df74 (patch) | |
| tree | c541665873b4baa4d75483aa5238677c37db7af4 /src/java_lang_System.cc | |
| parent | 6368967dc8a06835891b2e8925a45ee1af4e880e (diff) | |
Emit the same detail messages as dalvik for ArrayStoreExceptions from System.arraycopy.
Change-Id: I9b5e923fbd8eb92258de8a6639a129b0d180f286
Diffstat (limited to 'src/java_lang_System.cc')
| -rw-r--r-- | src/java_lang_System.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/java_lang_System.cc b/src/java_lang_System.cc index 985e753b11..78100cf688 100644 --- a/src/java_lang_System.cc +++ b/src/java_lang_System.cc @@ -107,7 +107,7 @@ namespace { void ThrowArrayStoreException_NotAnArray(const char* identifier, Object* array) { std::string actualType(PrettyTypeOf(array)); Thread::Current()->ThrowNewExceptionF("Ljava/lang/ArrayStoreException;", - "%s is not an array: %s", identifier, actualType.c_str()); + "%s of type %s is not an array", identifier, actualType.c_str()); } void System_arraycopy(JNIEnv* env, jclass, jobject javaSrc, jint srcPos, jobject javaDst, jint dstPos, jint length) { @@ -128,11 +128,11 @@ void System_arraycopy(JNIEnv* env, jclass, jobject javaSrc, jint srcPos, jobject Object* srcObject = Decode<Object*>(env, javaSrc); Object* dstObject = Decode<Object*>(env, javaDst); if (!srcObject->IsArrayInstance()) { - ThrowArrayStoreException_NotAnArray("src", srcObject); + ThrowArrayStoreException_NotAnArray("source", srcObject); return; } if (!dstObject->IsArrayInstance()) { - ThrowArrayStoreException_NotAnArray("dst", dstObject); + ThrowArrayStoreException_NotAnArray("destination", dstObject); return; } Array* srcArray = srcObject->AsArray(); |