Log exception for bug 307805798

Test: m
Bug: 307805798
Change-Id: I5195495eaf5303cb46657a24c173277e6e23372c
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 93cf5cb..5adaa3e 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -958,7 +958,8 @@
   CHECK(getSystemClassLoader->IsStatic());
 
   ObjPtr<mirror::Object> system_class_loader = getSystemClassLoader->InvokeStatic<'L'>(soa.Self());
-  CHECK(system_class_loader != nullptr);
+  CHECK(system_class_loader != nullptr)
+      << (soa.Self()->IsExceptionPending() ? soa.Self()->GetException()->Dump() : "<null>");
 
   ScopedAssertNoThreadSuspension sants(__FUNCTION__);
   jobject g_system_class_loader =