Rescue StandardError instead of Exception

It is bad style to rescue Exception, because it is the root of the
exception hierarchy, and includes SyntaxError, Interrupt, and Signal
Exception.

For more information see:
https://stackoverflow.com/questions/10048173/why-is-it-bad-style-to-rescue-exception-e-in-ruby