First error handling code.