catch any exceptions and present the user with an error message