Esempio n. 1
0
 /**
  * @return string  string represenation of exception with SQL command
  */
 public function __toString()
 {
     return parent::__toString() . ($this->sql ? "\nSQL: " . $this->sql : '');
 }
 /**
  * Construct the exception.
  * @param  string  Message describing the exception
  * @param  int     Some code
  * @param  string SQL command
  */
 public function __construct($message = NULL, $code = 0, $severity = NULL, $sql = NULL)
 {
     parent::__construct($message, (int) $code, $sql);
     $this->severity = $severity;
 }
Esempio n. 3
0
 /**
  * Constructs an exception above DibiException
  * @param string $message Expcetion message
  * @return Exception
  */
 public function __construct($message)
 {
     return parent::__construct($message, 0);
 }