Part of my general push for better exceptions. I'll add a unit test to libcore,
but until we lose the dexopt brain damage, we won't be able to see it (dexopt
can't optimize JUnit tests, so we get no coverage of inline natives on our
continuous builds; http://b/
3003994).
Change-Id: I3af757751534747fa4b3cc725b0914a8f7b3d45d
//LOGI("String.charAt this=0x%08x index=%d\n", arg0, arg1);
count = dvmGetFieldInt((Object*) arg0, STRING_FIELDOFF_COUNT);
if ((s4) arg1 < 0 || (s4) arg1 >= count) {
- dvmThrowException("Ljava/lang/StringIndexOutOfBoundsException;", NULL);
+ dvmThrowExceptionFmt("Ljava/lang/StringIndexOutOfBoundsException;",
+ "index=%d length=%d", arg1, count);
return false;
} else {
offset = dvmGetFieldInt((Object*) arg0, STRING_FIELDOFF_OFFSET);