Enhanced error highlighting for errors and warnings.