You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
371 B
PHP
20 lines
371 B
PHP
<?php
|
|
|
|
namespace BSR\Lib\Exception;
|
|
|
|
class SqlException extends \Exception
|
|
{
|
|
private $query;
|
|
|
|
public function __construct($message = "Sql Error", $query = "")
|
|
{
|
|
$this->query = $query;
|
|
parent::__construct($message, 0);
|
|
}
|
|
|
|
public function getSqlError()
|
|
{
|
|
return $this->getMessage().' while executing: '.$this->query;
|
|
}
|
|
}
|