From: Peter Palfrader Date: Wed, 2 Mar 2011 11:12:58 +0000 (+0100) Subject: Raise exception of appropriate type X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=732c425b5ecd4f2e00e2644b0627dc33b091c620;p=dsa-puppet.git Raise exception of appropriate type --- diff --git a/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb b/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb index 1615c3b8..4b4371db 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/whohosts.rb @@ -28,7 +28,7 @@ module Puppet::Parser::Functions ans['name'] = hoster end rescue => e - raise "Error while trying to match addr #{addr} for net #{net}: #{e.message}\n#{e.backtrace}" + raise Puppet::ParseError, "Error while trying to match addr #{addr} for net #{net}: #{e.message}\n#{e.backtrace}" end end end