Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error messages when loading rules. #150

Merged
merged 1 commit into from
Nov 28, 2016
Merged

Conversation

mstemm
Copy link
Contributor

@mstemm mstemm commented Nov 28, 2016

Related to the changes in https://github.com/draios/agent/pull/267,
improve error messages when trying to load sets of rules with errors:

  • Check that yaml parsing of rules_content actually resulted in
    something.
  • Return an error for rules that have an empty name.
  • Return an error for yaml objects that aren't a rule/macro/list.
  • When compiling, don't print an error message, simply return one,
    including a wrapper "can not compile ..." string.

Related to the changes in draios/agent#267,
improve error messages when trying to load sets of rules with errors:

 - Check that yaml parsing of rules_content actually resulted in
   something.
 - Return an error for rules that have an empty name.
 - Return an error for yaml objects that aren't a rule/macro/list.
 - When compiling, don't print an error message, simply return one,
   including a wrapper "can not compile ..." string.
@mstemm mstemm merged commit 9ca8ed9 into dev Nov 28, 2016
@mstemm mstemm deleted the better-load-errors branch November 28, 2016 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant