I've overhauled the error handling of DBConnector; Now instead of being passed a single error message with everything contained, it is passed a list of elements (Error message, SQL string, parameters, etc) and all error message string manipulation is done in this method. See. https://github.com/tractorcow/sapphire/blob/3.2-pdo-connector/model/connect/DBConnector.php#L23

See https://github.com/tractorcow/sapphire/blob/3.2-pdo-connector/model/connect/MySQLiConnector.php#L229 for an example of the simplified error triggering code.

Prior to this, every class that wanted to throw an error had essentially the same error message / sql concatenation pattern copied and pasted many times. If the output of database errors needs to be changed then there is now a single place this can be controlled.

I've also added an exception calss, SS_DatabaseException https://github.com/tractorcow/sapphire/blob/3.2-pdo-connector/model/connect/DatabaseException.php which contains both the error message, but also the SQL and any provided parameters as separate properties.