Handle exceptions thrown by getting `x.then`.

The strategy is to reject `promise` with the thrown exception as the reason. Fixes #87, fixes #88.