Expand error message in ResolvedMethodAccessTest

Bug: 199246839
Test: Print the error message even when check passes.
Change-Id: I224d76a316c4ec05152e69d28cb17cbbc38a111f
diff --git a/runtime/mirror/class-inl.h b/runtime/mirror/class-inl.h
index d7dfe0d..7a56d13 100644
--- a/runtime/mirror/class-inl.h
+++ b/runtime/mirror/class-inl.h
@@ -505,7 +505,9 @@
         class_idx,
         dex_cache,
         access_to->GetClassLoader());
-    DCHECK(dex_access_to != nullptr);
+    DCHECK(dex_access_to != nullptr)
+        << " Could not resolve " << dex_cache->GetDexFile()->StringByTypeIdx(class_idx)
+        << " when checking access to " << method->PrettyMethod() << " from " << PrettyDescriptor();
     if (UNLIKELY(!this->CanAccess(dex_access_to))) {
       if (throw_on_failure) {
         ThrowIllegalAccessErrorClassForMethodDispatch(this,