Hardening error message handling.