Permalink
Browse files

Add review changes: logger and exceptions

  • Loading branch information...
1 parent 2bf87ce commit 2917954874e51bb93013dd3de14bed7cd5c3572e @vmoravec committed Mar 10, 2014
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/modules/SlpService.rb
@@ -155,14 +155,16 @@ def verified?
end
module DnsCache
+ extend ::Yast::Logger
+
def self.resolve(ip_address)
host = find(ip_address)
if host.nil?
host = Resolv.getname(ip_address)
update(ip_address => host)
end
- rescue Resolv::ResolvError => e
- Builtins.y2error(
+ rescue StandardError, Timeout::Error => e
+ log.error(
"Name resolution failed for given SLP service IP address; " + e.message
)
ensure

0 comments on commit 2917954

Please sign in to comment.