Convert from using failure to exceptions

Pinging @snoyberg @edwardk