Add exception-generating variant.

A common usecase is that non-successful results should be converted to
an exception.  This execX function helps fulfil that requirement.