Commit graph

1 commit

Author SHA1 Message Date
Dave Collins
6e0aab52df Improve the RuleError type to include error codes.
This commit changes the RuleError type to a struct which consists of an
error code and human-readable description.

From a usage perspective, existing code should not break since type
asserting an error to a RuleError still works in the same manner.  The
difference is the caller can now take that type asserted RuleError and
access the .ErrorCode field on it to programmatically identify the
specific rule that was violated.

ok @jrick
2014-06-24 19:14:24 -05:00