noncent / pdo_class_wrapper

A Class for PDO Wrapper
25 stars 21 forks source link

[Feature request] Add more description to debug problems #13

Open rumplin opened 3 years ago

rumplin commented 3 years ago

Hello,

please enhance the self::error calls, to add more details.

I had multiple pdoQuery calls, but I didn't know in which call I have an error. So I changed the pdoQuery method to help me out:

 } catch (PDOException $e) {
        self::error($e->getMessage() . ': ' . __LINE__ . ". SQL: " . $sSql);
 } // end try catch block

Would even help more if I knew where in my original script I had the error - filename and line. Maybe something that can be achieved with $_SERVER["SCRIPT_FILENAME"]