dvmThrowException(gDvm.exUnsatisfiedLinkError, msg);
}
+void dvmThrowUnsatisfiedLinkError(const char* msg, const Method* method) {
+ char* desc = dexProtoCopyMethodDescriptor(&method->prototype);
+ char* className = dvmDescriptorToDot(method->clazz->descriptor);
+ dvmThrowExceptionFmt(gDvm.exUnsatisfiedLinkError, "%s: %s.%s:%s",
+ msg, className, method->name, desc);
+ free(className);
+ free(desc);
+}
+
void dvmThrowUnsupportedOperationException(const char* msg) {
dvmThrowException(gDvm.exUnsupportedOperationException, msg);
}
* the given detail message.
*/
void dvmThrowUnsatisfiedLinkError(const char* msg);
+void dvmThrowUnsatisfiedLinkError(const char* msg, const Method* method);
/**
* Throw an UnsupportedOperationException in the current thread, with
IF_ALOGW() {
char* desc = dexProtoCopyMethodDescriptor(&method->prototype);
- ALOGW("No implementation found for native %s.%s %s",
+ ALOGW("No implementation found for native %s.%s:%s",
clazz->descriptor, method->name, desc);
free(desc);
}
- dvmThrowUnsatisfiedLinkError(method->name);
+ dvmThrowUnsatisfiedLinkError("Native method not found", method);
}