OSDN Git Service

Use Throwable.getMessage() when logging exceptions.
authorAndy McFadden <fadden@android.com>
Thu, 16 Sep 2010 22:32:43 +0000 (15:32 -0700)
committerAndy McFadden <fadden@android.com>
Thu, 16 Sep 2010 22:32:43 +0000 (15:32 -0700)
commit8552f4498a720a6fcb34ebab69d6e3c34bee491d
treee046de8a573353474075f6b6ff7efe0fe2899c87
parentde952db74f54108630a3dd24af0b38e583b62ed3
Use Throwable.getMessage() when logging exceptions.

The VM's internal exception logger was pulling the exception's detail
message out of a field in Throwable.  This gets the wrong answer when
the exception overrides getMessage().

The VM now invokes the appropriate getMessage() method and displays
that instead.  This is of particular interest in CheckJNI failure
messages.

Also, don't assert that switching from "running" to "running" is
a problem.  It's a bit weird, but there's nothing wrong with it,
and there's a fair chance that the updated exception log function
will do it.

Bug 2845581

Change-Id: Id8d77221129ae7b45473e700a79a335164049362
vm/Exception.c
vm/Globals.h
vm/Thread.c