Improved SQL error logging in the IRIS link code.