Clean up exception handling across the application.

Thanks to robots.thoughtbot.com/rescue-standarderror-not-exception/
for finally persuading me to do this right.