Doc #60283 [Opn]: rollback would throw a PDOException and that's no documented
| From: | boaz dot rymland at gmail dot com | Date: | Sun, 13 Nov 2011 08:26:50 +0000 |
| Subject: | Doc #60283 [Opn]: 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-7428@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
User updated by: boaz dot rymland at gmail dot com
Reported by: boaz dot rymland at gmail dot com
-Summary: rollback would throw a PDOException
+Summary: rollback would throw a PDOException and that's no
documented
Status: Open
Type: Documentation Problem
Package: PDO related
Operating System: RedHat
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
updated bug title...
Previous Comments:
------------------------------------------------------------------------
[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