Merge "ART: Add VLOG printing of SetStatus(Error)"
diff --git a/runtime/mirror/class.cc b/runtime/mirror/class.cc
index 949ff5f..bed26b2 100644
--- a/runtime/mirror/class.cc
+++ b/runtime/mirror/class.cc
@@ -78,6 +78,12 @@
     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);