Raise and handle unexpected exceptions.