Created error handler.