5 class DatabaseError extends \Exception
8 public function __construct($message, $code, $previous, $oPDOErr, $sSql = null)
10 parent::__construct($message, $code, $previous);
11 // https://secure.php.net/manual/en/class.pdoexception.php
12 $this->oPDOErr = $oPDOErr;
16 public function __toString()
18 return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
21 public function getSqlError()
23 return $this->oPDOErr->getMessage();
26 public function getSqlDebugDump()
29 return var_export($this->oPDOErr, true);