/**
  * Constructor.
  *
  * @param string                                $message         The exception message.
  * @param \Doctrine\DBAL\Driver\DriverException $driverException The DBAL driver exception to chain.
  */
 public function __construct($message, \Doctrine\DBAL\Driver\DriverException $driverException)
 {
     $exception = null;
     if ($driverException instanceof \Exception) {
         $exception = $driverException;
     }
     parent::__construct($message, 0, $exception);
     $this->driverException = $driverException;
 }
示例#2
0
 /**
  * @param string     $message
  * @param int        $code
  * @param \Exception $previous
  */
 public function __construct($message = '', $code = 0, \Exception $previous = null)
 {
     $message = static::CONTEXT . ': ' . $message;
     parent::__construct($message, $code, $previous);
 }