Skip to content

Commit

Permalink
(puppetlabs#1532) Replace ParserError with Puppet::Error
Browse files Browse the repository at this point in the history
I'm not sure how we ended up with ParserError in the provider. This
exception doesn't exist in Ruby. Puppet ships ther own exception,
Puppet::Error. It probably makes sense to raise that instead.
  • Loading branch information
bastelfreak committed Oct 19, 2023
1 parent 05bc715 commit dbb672b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/puppet/provider/postgresql_conf/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def write_config(file, lines)
# check, if resource exists in postgresql.conf file
def exists?
select = parse_config.select { |hash| hash[:key] == resource[:key] }
raise ParserError, "found multiple config items of #{resource[:key]} found, please fix this" if select.length > 1
raise Puppet::Error, "found multiple config items of #{resource[:key]} found, please fix this" if select.length > 1
return false if select.empty?

@result = select.first
Expand Down

0 comments on commit dbb672b

Please sign in to comment.