Clean up promises code some more.
Simplify error-handling code

Thanks to @jdfreder for this change.
Merge pull request #6988 from jasongrout/promises-again

Clean up promises code some more.