summaryrefslogtreecommitdiffstats
path: root/runtime/transaction.cc
diff options
context:
space:
mode:
authorSebastien Hertz <shertz@google.com>2015-04-03 07:49:44 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-04-03 07:49:46 +0000
commitae36b4a8d05525c977af831f1b31126d84159e4f (patch)
tree1b474b0bdec9db773cab0a2bca70dce1452f7cd1 /runtime/transaction.cc
parenta68a7cf8f3a6fef22d71a14350176115cb13857f (diff)
parent2fd7e69505195cda4caaa3161aaf37315552a698 (diff)
downloadart-ae36b4a8d05525c977af831f1b31126d84159e4f.zip
art-ae36b4a8d05525c977af831f1b31126d84159e4f.tar.gz
art-ae36b4a8d05525c977af831f1b31126d84159e4f.tar.bz2
Merge "Use specific exception class to abort transaction"
Diffstat (limited to 'runtime/transaction.cc')
-rw-r--r--runtime/transaction.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/runtime/transaction.cc b/runtime/transaction.cc
index 186cfea..5b8d23b 100644
--- a/runtime/transaction.cc
+++ b/runtime/transaction.cc
@@ -60,8 +60,8 @@ Transaction::~Transaction() {
void Transaction::Abort(const std::string& abort_message) {
MutexLock mu(Thread::Current(), log_lock_);
- // We may abort more than once if the java.lang.InternalError thrown at the
- // time of the abort has been caught during execution of a class initializer.
+ // We may abort more than once if the exception thrown at the time of the
+ // previous abort has been caught during execution of a class initializer.
// We just keep the message of the first abort because it will cause the
// transaction to be rolled back anyway.
if (!aborted_) {
@@ -70,16 +70,17 @@ void Transaction::Abort(const std::string& abort_message) {
}
}
-void Transaction::ThrowInternalError(Thread* self, bool rethrow) {
+void Transaction::ThrowAbortError(Thread* self, bool rethrow) {
if (kIsDebugBuild && rethrow) {
- CHECK(IsAborted()) << "Rethrow InternalError while transaction is not aborted";
+ CHECK(IsAborted()) << "Rethrow " << Transaction::kAbortExceptionDescriptor
+ << " while transaction is not aborted";
}
std::string abort_msg(GetAbortMessage());
// Temporary workaround for b/20019689.
if (self->IsExceptionPending()) {
self->ClearException();
}
- self->ThrowNewException("Ljava/lang/InternalError;", abort_msg.c_str());
+ self->ThrowNewException(Transaction::kAbortExceptionSignature, abort_msg.c_str());
}
bool Transaction::IsAborted() {