Clean-up error reporting code.