I'm not sure if that covers all possible exceptions raised in DNS resolving. What about timeout? The [source code](http://ruby-doc.org/stdlib-2.0.0/libdoc/resolv/rdoc/Resolv/DNS.html#method-i-each_resource) (Click the function header to show the sources) shows e.g. `Config::OtherResolvError` exception.

Maybe generic `Exception` should be used in this case?