commit | ceb230f20b143cb0b50e9826fb1432166019870c | [log] [tgz] |
---|---|---|
author | Andy McFadden <fadden@android.com> | Wed Oct 21 15:36:48 2009 -0700 |
committer | Andy McFadden <fadden@android.com> | Wed Oct 21 15:36:48 2009 -0700 |
tree | 867c4672d8f5719d2e9384513596a30b97e5b280 | |
parent | 5874dee7e219c3bef06c537f961fc72b374884b6 [diff] |
Clear pending exception before throwing a new one. The JNI helper function that throws an exception calls FindClass, which isn't allowed if an exception is currently pending. Some of our code called this when an operation failed without noting that the thing that failed already threw an exception; this caused the VM to blow up in a rather unhelpful way. We now log the class name and optional message from the original exception, clear it, and then allocate & throw the new one. For bug 2141867.