Class for detecting SQL error messages