inkblot / puppet-bind

18 stars 82 forks source link

Improve error reporting #35

Closed dougneal closed 9 years ago

dougneal commented 9 years ago

I encountered a misleading error when passing invalid parameters to resource_record:

Error: Failed to apply catalog: Parameter record failed on Resource_record[xxxxx]: Validate method failed for class record: uninitialized constant Util at /path/to/my/manifest.pp:48

It seems that the recommended way to bubble up validation failures is raise ArgumentError: https://docs.puppetlabs.com/guides/custom_types.html#validation-and-munging

inkblot commented 9 years ago

Thanks for the PR!

dougneal commented 9 years ago

No problem!

inkblot commented 9 years ago

I have released version 4.1.0 to the forge which contains this branch.