# File lib/puppet/network/format_handler.rb, line 11
11:         def protect(method, args)
12:             begin
13:                 Puppet::Network::FormatHandler.format(format).send(method, *args)
14:             rescue => details
15:                 direction = method.to_s.include?("intern") ? "from" : "to"
16:                 error = FormatError.new("Could not %s %s %s: %s" % [method, direction, format, details])
17:                 error.set_backtrace(details.backtrace)
18:                 raise error
19:             end
20:         end