I was wondering how would one go about writing custom exception handlers.
so that I can do something like
throw new dbException($sql, $message);
and have it output
There was an error in your query Message: {$message here}
Query: {$sql here}
Line: {line exception was thrown on}
File: {file exception was thrown from}
but I also want to to catch eg syntax errors and parse errors (if possible)