summaryrefslogtreecommitdiffstats
path: root/runtime/transaction.cc
diff options
context:
space:
mode:
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 186cfea0fe..5b8d23b70f 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() {