Merge "ART: Workaround for b/20019689"
diff --git a/runtime/transaction.cc b/runtime/transaction.cc
index 3b708f6..186cfea 100644
--- a/runtime/transaction.cc
+++ b/runtime/transaction.cc
@@ -75,7 +75,11 @@
     CHECK(IsAborted()) << "Rethrow InternalError while transaction is not aborted";
   }
   std::string abort_msg(GetAbortMessage());
-  self->ThrowNewWrappedException("Ljava/lang/InternalError;", abort_msg.c_str());
+  // Temporary workaround for b/20019689.
+  if (self->IsExceptionPending()) {
+    self->ClearException();
+  }
+  self->ThrowNewException("Ljava/lang/InternalError;", abort_msg.c_str());
 }
 
 bool Transaction::IsAborted() {