Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
4 / 4 |
| SQLException | |
100.00% |
1 / 1 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
4 / 4 |
| __construct | |
100.00% |
1 / 1 |
1 | |
100.00% |
3 / 3 |
|||
| getSQL | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| <?php | |
| declare(strict_types = 1); | |
| namespace Siesta\Database\Exception; | |
| use Siesta\Exception\SiestaException; | |
| /** | |
| * @author Gregor Müller | |
| */ | |
| class SQLException extends \Exception implements SiestaException | |
| { | |
| /** | |
| * @var string | |
| */ | |
| protected $sqlStatement; | |
| /** | |
| * @param string $message | |
| * @param int $code | |
| * @param string $sqlStatement | |
| */ | |
| public function __construct(string $message = null, int $code = null, string $sqlStatement = null) | |
| { | |
| parent::__construct($message, $code); | |
| $this->sqlStatement = $sqlStatement; | |
| } | |
| /** | |
| * @return string | |
| */ | |
| public function getSQL() | |
| { | |
| return $this->sqlStatement; | |
| } | |
| } |