Use StandardError instead of Exception

It's generally not a good idea to rescue from `Exception`.

See [this blog post](http://daniel.fone.net.nz/blog/2013/05/28/why-you-should-never-rescue-exception-in-ruby/) for more details.