puppetlabs-stdlib/lib
Jeff McCune 41b07232e4 (#12357) Add ability to display an error message from validate_re
I've seen a number of times the following error displayed to the end
user:

    validate_re(): "" does not match "^true$|^false$" at /p/t/f.pp:40

This is an absolutely horrific error message.  I'm to blame for it.
Users stumble over this quite often and they shouldn't have to go read
the code to sort out what's happening.

This patch makes an effort to fix the problem by adding a third,
optional, argument to validate_re().  This third argument will be the
message thrown back in the exception which will be displayed to the end
user.

This sets the stage for nicer error messages coming from modules we
write.

This patch is backwards compatible but is a new feature.
2012-03-07 15:33:27 -08:00
..
facter Merge pull request #44 from jeffmccune/ticket/2.3.x/12357_add_puppet_settings_facts 2012-03-06 17:14:35 -08:00
puppet (#12357) Add ability to display an error message from validate_re 2012-03-07 15:33:27 -08:00