Changeset 4345
- Timestamp:
- 05/09/08 18:48:49 (14 months ago)
- Files:
-
- 1 modified
-
branches/0.11/lib/Doctrine/Connection.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.11/lib/Doctrine/Connection.php
r4317 r4345 453 453 if (extension_loaded('pdo')) { 454 454 if (in_array($e[0], PDO::getAvailableDrivers())) { 455 $this->dbh = new PDO($this->options['dsn'], $this->options['username'], 455 try { 456 $this->dbh = new PDO($this->options['dsn'], $this->options['username'], 456 457 $this->options['password'], $this->options['other']); 457 458 458 $this->dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 459 $this->dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 460 } catch (PDOException $e) { 461 throw new Doctrine_Connection_Exception('PDO Connection Error: ' . $e->getMessage()); 462 } 459 463 $found = true; 460 464 }