puppetlabs-stdlib/lib/puppet/parser/functions
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
..
abs.rb Added doc strings for first five functions 2011-07-30 04:22:30 +10:00
bool2num.rb Added doc strings for first five functions 2011-07-30 04:22:30 +10:00
capitalize.rb Added doc strings for first five functions 2011-07-30 04:22:30 +10:00
chomp.rb Added doc strings for first five functions 2011-07-30 04:22:30 +10:00
chop.rb Added doc strings for first five functions 2011-07-30 04:22:30 +10:00
delete.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
delete_at.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
downcase.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
empty.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
flatten.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
get_module_path.rb (#10802) add new function get_module_path 2011-11-14 13:22:55 -08:00
getvar.rb Docs: Copyedit function doc strings 2011-08-18 12:39:04 -07:00
grep.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
has_key.rb Docs: Correct indentation of markdown code examples 2011-08-18 12:39:04 -07:00
hash.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
is_array.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
is_domain_name.rb Check according to rfc1035 2012-01-11 19:17:03 -08:00
is_float.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
is_hash.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
is_integer.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
is_ip_address.rb Prep for stdlib merge 2011-08-05 08:25:03 +01:00
is_mac_address.rb Prep for stdlib merge 2011-08-05 08:25:03 +01:00
is_numeric.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
is_string.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
join.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
keys.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
loadyaml.rb Docs: Copyedit function doc strings 2011-08-18 12:39:04 -07:00
lstrip.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
member.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
merge.rb Docs: Improve example in merge function 2011-08-18 12:39:04 -07:00
num2bool.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
parsejson.rb (#10285) Refactor json to use pson instead. 2011-10-25 15:54:47 -07:00
parseyaml.rb Prep for stdlib merge 2011-08-05 08:25:03 +01:00
prefix.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
range.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
reverse.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
rstrip.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
shuffle.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
size.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
sort.rb Fix some ruby 1.9.2 issues. 2011-07-30 00:44:02 +01:00
squeeze.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
str2bool.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
str2saltedsha512.rb New str2saltedsha512 function for OS X Passwords 2012-01-09 11:30:47 -08:00
strftime.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
strip.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
swapcase.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
time.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
type.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
unique.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
upcase.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
validate_absolute_path.rb (#12357) Add validate_absolute_path() function 2012-03-07 11:58:47 -08:00
validate_array.rb Docs: Copyedit function doc strings 2011-08-18 12:39:04 -07:00
validate_bool.rb Docs: Remove author emails from stdlib functions 2011-08-18 12:39:05 -07:00
validate_hash.rb Docs: Remove author emails from stdlib functions 2011-08-18 12:39:05 -07:00
validate_re.rb (#12357) Add ability to display an error message from validate_re 2012-03-07 15:33:27 -08:00
validate_slength.rb (#12776) Added validate_slength function and rspec test 2012-02-22 18:12:34 +00:00
validate_string.rb Docs: Copyedit function doc strings 2011-08-18 12:39:04 -07:00
values.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
values_at.rb Fix some ruby 1.9.2 issues. 2011-07-30 00:44:02 +01:00
zip.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00