diff options
Diffstat (limited to 'runtime/common_throws.cc')
| -rw-r--r-- | runtime/common_throws.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/common_throws.cc b/runtime/common_throws.cc index 75cce424e9..4f705f2056 100644 --- a/runtime/common_throws.cc +++ b/runtime/common_throws.cc @@ -654,6 +654,13 @@ void ThrowStackOverflowError(Thread* self) { } } +// StringIndexOutOfBoundsException + +void ThrowStringIndexOutOfBoundsException(int index, int length) { + ThrowException("Ljava/lang/StringIndexOutOfBoundsException;", nullptr, + StringPrintf("length=%d; index=%d", length, index).c_str()); +} + // VerifyError void ThrowVerifyError(mirror::Class* referrer, const char* fmt, ...) { |