132: def change_to_s(currentvalue, newvalue)
133: begin
134: if currentvalue == :absent
135: return "defined '%s' as '%s'" %
136: [self.name, self.should_to_s(newvalue)]
137: elsif newvalue == :absent or newvalue == [:absent]
138: return "undefined %s from '%s'" %
139: [self.name, self.is_to_s(currentvalue)]
140: else
141: return "%s changed '%s' to '%s'" %
142: [self.name, self.is_to_s(currentvalue), self.should_to_s(newvalue)]
143: end
144: rescue Puppet::Error, Puppet::DevError
145: raise
146: rescue => detail
147: puts detail.backtrace if Puppet[:trace]
148: raise Puppet::DevError, "Could not convert change %s to string: %s" %
149: [self.name, detail]
150: end
151: end