# File lib/puppet/network/format_handler.rb, line 20 def initialize(format) @format = format end
# File lib/puppet/network/format_handler.rb, line 11 def protect(method, args) Puppet::Network::FormatHandler.format(format).send(method, *args) rescue => details direction = method.to_s.include?("intern") ? "from" : "to" error = FormatError.new("Could not #{method} #{direction} #{format}: #{details}") error.set_backtrace(details.backtrace) raise error end