Throw exceptions from ClassLinker.
Change-Id: I0a00595d675af21c259639800c80dbd61ba721ff
diff --git a/src/thread.cc b/src/thread.cc
index 97f5710..d86a0c5 100644
--- a/src/thread.cc
+++ b/src/thread.cc
@@ -1284,11 +1284,15 @@
}
void Thread::ThrowNewException(const char* exception_class_descriptor, const char* fmt, ...) {
- std::string msg;
va_list args;
va_start(args, fmt);
- StringAppendV(&msg, fmt, args);
+ ThrowNewExceptionV(exception_class_descriptor, fmt, args);
va_end(args);
+}
+
+void Thread::ThrowNewExceptionV(const char* exception_class_descriptor, const char* fmt, va_list ap) {
+ std::string msg;
+ StringAppendV(&msg, fmt, ap);
// Convert "Ljava/lang/Exception;" into JNI-style "java/lang/Exception".
CHECK_EQ('L', exception_class_descriptor[0]);