Create a general error handling to inform the user.