Exemplo n.º 1
0
 /**
  * @return string  string represenation of exception with SQL command
  */
 public function __toString()
 {
     return parent::__toString() . ($this->sql ? "\nSQL: " . $this->sql : '');
 }
Exemplo n.º 2
0
 /**
  * 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;
 }
Exemplo n.º 3
0
 /**
  * Constructs an exception above DibiException
  * @param string $message Expcetion message
  * @return Exception
  */
 public function __construct($message)
 {
     return parent::__construct($message, 0);
 }