From 2eb5a432d2229788ce2fdb09f36c6f4bebdea813 Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Fri, 7 Feb 2020 09:44:59 +0100 Subject: Initial commit --- src/DBError.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/DBError.php (limited to 'src/DBError.php') diff --git a/src/DBError.php b/src/DBError.php new file mode 100644 index 0000000..4860d2f --- /dev/null +++ b/src/DBError.php @@ -0,0 +1,31 @@ +msg = $msg; + $this->sql = $sql; + + parent::__construct($this->buildMessage()); + } + + private function buildMessage(): string + { + return "{$this->msg}. SQL was: {$this->sql}"; + } +} \ No newline at end of file -- cgit v1.2.3-70-g09d2