diff options
author | Jeff McCune <jeff@puppetlabs.com> | 2012-03-07 15:01:11 -0800 |
---|---|---|
committer | Jeff McCune <jeff@puppetlabs.com> | 2012-03-07 15:33:27 -0800 |
commit | 41b07232e464f25403a8f9c786ec0061bf6dc40e (patch) | |
tree | 44dccf99e8f7ebbcf3d8a061ee3a467689385d94 /README_DEVELOPER.markdown | |
parent | 898ff80fa762dbbe52f50b872dd1bf3b04c254c9 (diff) |
(#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.
Diffstat (limited to 'README_DEVELOPER.markdown')
0 files changed, 0 insertions, 0 deletions