summaryrefslogtreecommitdiffstats
path: root/runtime/class_linker.cc
diff options
context:
space:
mode:
authorSebastien Hertz <shertz@google.com>2015-04-02 11:11:19 +0200
committerSebastien Hertz <shertz@google.com>2015-04-03 09:31:59 +0200
commit2fd7e69505195cda4caaa3161aaf37315552a698 (patch)
tree2bd681443ad36a8616f237a12e56ecbdb7054f8e /runtime/class_linker.cc
parentc6e949a6d93fae2351fc59ed825657adee8185dc (diff)
downloadandroid_art-2fd7e69505195cda4caaa3161aaf37315552a698.tar.gz
android_art-2fd7e69505195cda4caaa3161aaf37315552a698.tar.bz2
android_art-2fd7e69505195cda4caaa3161aaf37315552a698.zip
Use specific exception class to abort transaction
We used to throw a java.lang.InternalError when aborting a transaction (when preinitializing image classes at compilation time). We now use dedicated class dalvik.system.TransactionAbortError that is only thrown by the compiler to abort a transaction. This class has constructors taking a java.lang.Throwable "cause" so we can wrap exceptions causing the transaction to abort (for instance class java.lang.ClassNotFoundException) and give more information about the cause of the transaction abort. Bug: 20019689 Change-Id: I019a72a1c754d8bba6a7ad6bb0f02e4fd6668622
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r--runtime/class_linker.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index a89196d830..be4b9e9b68 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -3411,7 +3411,7 @@ bool ClassLinker::InitializeClass(Thread* self, Handle<mirror::Class> klass,
// so we need to throw it again now.
VLOG(compiler) << "Return from class initializer of " << PrettyDescriptor(klass.Get())
<< " without exception while transaction was aborted: re-throw it now.";
- Runtime::Current()->ThrowInternalErrorForAbortedTransaction(self);
+ Runtime::Current()->ThrowTransactionAbortError(self);
mirror::Class::SetStatus(klass, mirror::Class::kStatusError, self);
success = false;
} else {