Displays error messages when things go wrong.