OSDN Git Service

Be less misleading when something goes wrong early.
authorElliott Hughes <enh@google.com>
Wed, 21 Jul 2010 00:23:06 +0000 (17:23 -0700)
committerElliott Hughes <enh@google.com>
Wed, 21 Jul 2010 18:02:51 +0000 (11:02 -0700)
In the recent icu4c breakage, we misinterpreted the "thrown during ...<clinit>"
to mean that <clinit> was the method that threw. This patch makes the wording
less easy to misinterpret.

The other thing that was confusing was the lack of a stack trace. It turns out
that dalvikvm tried to output a stack trace when the thread died, but it was
using LOGI. We'd have seen that on the device (which logs everything), but it
was filtered out by the host build's liblog. (Our ANDROID_LOG_TAGS was set to
"*:w".)

Change-Id: Ib46b3c7addc75aed103a3eb9fa010234f4444fbe

vm/Exception.c
vm/oo/Class.c

index fb3b9f8..3a73420 100644 (file)
@@ -744,7 +744,7 @@ void dvmPrintExceptionStackTrace(void)
     }
 
     if (self->exception != NULL) {
-        LOGI("NOTE: exception thrown while printing stack trace: %s\n",
+        LOGW("NOTE: exception thrown while printing stack trace: %s\n",
             self->exception->clazz->descriptor);
     }
 
index b9dfb7d..f10a9c6 100644 (file)
@@ -4478,7 +4478,7 @@ noverify:
          * need to throw an ExceptionInInitializerError, but we want to
          * tuck the original exception into the "cause" field.
          */
-        LOGW("Exception %s thrown during %s.<clinit>\n",
+        LOGW("Exception %s thrown while initializing %s\n",
             (dvmGetException(self)->clazz)->descriptor, clazz->descriptor);
         throwClinitError();
         //LOGW("+++ replaced\n");