Changeset 1909


Ignore:
Timestamp:
4/16/2010 4:05:39 AM (5 years ago)
Author:
lowjoel
Message:

Throw exceptions when we have database errors so that they are always handled.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/website/scripts/Database.php.in

    r1908 r1909  
    1414    public function __construct() 
    1515    { 
    16         parent::__construct($dsn, $username, $passwd, $options); 
    17     } 
     16        parent::__construct($dsn, $username, $passwd, $options); 
     17        this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 
     18    } 
    1819} 
    1920?> 
Note: See TracChangeset for help on using the changeset viewer.