Implemented MySqlException class to handle SQL errors cleanly