Doc #60283 [Opn->Csd]: rollback would throw a PDOException and that's no documented

From: Date: Sat, 03 Dec 2011 23:08:58 +0000
Subject: Doc #60283 [Opn->Csd]: rollback would throw a PDOException and that's no documented
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-7528@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=60283&edit=1 ID: 60283 Updated by: frozenfire@php.net Reported by: boaz dot rymland at gmail dot com Summary: rollback would throw a PDOException and that's no documented -Status: Open +Status: Closed Type: Documentation Problem Package: PDO related Operating System: RedHat PHP Version: Irrelevant -Assigned To: +Assigned To: frozenfire Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2011-12-03 23:08:38] frozenfire@php.net Automatic comment from SVN on behalf of frozenfire Revision: http://svn.php.net/viewvc/?view=revision&revision=320328 Log: Clarified that a PDOException is thrown if no transaction is active. Closes bug #60283. ------------------------------------------------------------------------ [2011-11-13 08:26:50] boaz dot rymland at gmail dot com updated bug title... ------------------------------------------------------------------------ [2011-11-13 08:25:35] boaz dot rymland at gmail dot com Description: ------------ --- From manual page: http://www.php.net/pdo.rollback#refsect1-pdo.rollback- returnvalues --- manual page on the php.net documentation should state that PDO::rollback would throw a PDOException on certain conditions, like if no transaction existed. The current documentation on the site says that it will return true on success or false on problems, and vaguely states that "It is an error to call this method if no transaction is active". this is vague and doesn't explain that an exception will be thrown. This caused an un-handled exception in my code since in the upmost catch block I did a rollback to make sure that any open transaction is rolled-back. that lead to an un-handled exception... :-( Expected result: ---------------- state in the documentation this possible PDOExcetion throwing ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=60283&edit=1

« previous php.doc.bugs (#7528) next »