summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2015-08-24 21:09:05 -0700
committer Andreas Gampe <agampe@google.com> 2015-08-24 21:09:05 -0700
commit31decb12db33cb9ed3fdb0de60ca18c6da077fe4 (patch)
treeb68a418e93780ed55abd79dc8e76f3459e884254
parentdcff51a0079c5e3abaf0335f7cb9a3dd44044456 (diff)
ART: Add VLOG printing of SetStatus(Error)
In verbose:class mode, print a message when a class is set to erroneous, and dump any pending exception. Change-Id: I2ebfe4fcd8495c3ff42675bd3c0f80125b23c019
-rw-r--r--runtime/mirror/class.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/mirror/class.cc b/runtime/mirror/class.cc
index 949ff5fe3d..bed26b2813 100644
--- a/runtime/mirror/class.cc
+++ b/runtime/mirror/class.cc
@@ -78,6 +78,12 @@ void Class::SetStatus(Handle<Class> h_this, Status new_status, Thread* self) {
CHECK_NE(h_this->GetStatus(), kStatusError)
<< "Attempt to set as erroneous an already erroneous class "
<< PrettyClass(h_this.Get());
+ if (VLOG_IS_ON(class_linker)) {
+ LOG(ERROR) << "Setting " << PrettyDescriptor(h_this.Get()) << " to erroneous.";
+ if (self->IsExceptionPending()) {
+ LOG(ERROR) << "Exception: " << self->GetException()->Dump();
+ }
+ }
// Stash current exception.
StackHandleScope<1> hs(self);