ART: Show the previous failure type in init rejection
Print the descriptor of the failure type when we reject re-init
on a previously failed class.
Bug: 24213543
Change-Id: Ied0f101b81e386951313edd09865a8b0142b9d16
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index bc8a9f4..a547a5d 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -128,7 +128,11 @@
// the previous error.
Runtime* const runtime = Runtime::Current();
if (!runtime->IsAotCompiler()) { // Give info if this occurs at runtime.
- LOG(INFO) << "Rejecting re-init on previously-failed class " << PrettyClass(c);
+ std::string extra;
+ if (c->GetVerifyErrorClass() != nullptr) {
+ extra = PrettyDescriptor(c->GetVerifyErrorClass());
+ }
+ LOG(INFO) << "Rejecting re-init on previously-failed class " << PrettyClass(c) << ": " << extra;
}
CHECK(c->IsErroneous()) << PrettyClass(c) << " " << c->GetStatus();