From da39c005b038758d546c926ead7e104e1752658d Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 21 Jul 2016 10:48:50 -0700 Subject: [PATCH] Improve database endAtomic() error messages Change-Id: I3317012befe454654429bb5acb8988d4e7ccfb5a --- includes/db/Database.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/db/Database.php b/includes/db/Database.php index f23e24f39f..9b73584cd9 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -2564,12 +2564,12 @@ abstract class DatabaseBase implements IDatabase { final public function endAtomic( $fname = __METHOD__ ) { if ( !$this->mTrxLevel ) { - throw new DBUnexpectedError( $this, 'No atomic transaction is open.' ); + throw new DBUnexpectedError( $this, "No atomic transaction is open (got $fname)." ); } if ( !$this->mTrxAtomicLevels || array_pop( $this->mTrxAtomicLevels ) !== $fname ) { - throw new DBUnexpectedError( $this, 'Invalid atomic section ended.' ); + throw new DBUnexpectedError( $this, "Invalid atomic section ended (got $fname)." ); } if ( !$this->mTrxAtomicLevels && $this->mTrxAutomaticAtomic ) { -- 2.20.1