From:             
Operating system: 
PHP version:      5.3.5
Package:          PDO related
Bug Type:         Feature/Change Request
Bug description:PDOException needs info about PDO object or driver that 
triggered exception.

Description:
------------
Please add a getPDODriver() and a getPDOObject() method to PDOException.



I want to create a custom subclass of PDOException that handles duplicate
key violations and has an accessor method to get the offending field(s).



To do this, I need to parse the database driver specific error message for
the field names. This can only be done if PDOException knows which database
driver is being used. Unfortunately it does not know this.



I can imagine more scenarios where PDOException needs information about the
PDO object or driver (in case PDO object couldn't even be instantiated)
that triggered it.




-- 
Edit bug report at http://bugs.php.net/bug.php?id=53909&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=53909&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=53909&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=53909&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=53909&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=53909&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=53909&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=53909&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=53909&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=53909&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=53909&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=53909&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=53909&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=53909&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=53909&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=53909&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=53909&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=53909&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=53909&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=53909&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=53909&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=53909&r=mysqlcfg

Reply via email to