More idiomatic throwing of errors

Via @melissanoelle / @andrewrk