using composer package format, decoupling bsr libraries and implementation
This commit is contained in:
19
src/Exception/SqlException.php
Normal file
19
src/Exception/SqlException.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user