From: Aaron Schulz Date: Thu, 21 Jul 2016 17:48:50 +0000 (-0700) Subject: Improve database endAtomic() error messages X-Git-Tag: 1.31.0-rc.0~6302^2 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=da39c005b038758d546c926ead7e104e1752658d;p=lhc%2Fweb%2Fwiklou.git Improve database endAtomic() error messages Change-Id: I3317012befe454654429bb5acb8988d4e7ccfb5a --- 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 ) {