Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Conversation

@krocard
Copy link
Contributor

@krocard krocard commented Oct 30, 2014

When failing to parse a criterion rule, the pfw was outputing: Value error:
This did not help to find the root cause.

With this patch it would have output:
Value error: <Input value> is not part of criterion <Criterion>
(Of course replacing <*> by the apropriate value)

@krocard krocard force-pushed the Fix_error_message_in_case_of_unknown_criterion_value branch from 3f48c6b to f94b55b Compare December 1, 2014 10:59
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure strError is always useless in this context?

I agree that the new error message is far better than the old one, but I am unsure that the strError is always useless in this case.
Maybe we should check all the calls to CSelectionCriterionRule::parse() to ensure strError is always empty/not relevant here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be empty as it is an out parameter.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add quotes around the string values

@gdenneul
Copy link
Contributor

👍

When failing to parse a criterion rule, the pfw was outputing:
Value error:
This did not help to find the root cause.

With this patch it would have output:
Value error: <Input value> is not part of criterion <Criterion>

Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com>
@krocard krocard force-pushed the Fix_error_message_in_case_of_unknown_criterion_value branch from 2adebb9 to 2da73a3 Compare January 22, 2015 14:41
dawagner added a commit that referenced this pull request Jan 29, 2015
…own_criterion_value

Fix error message in case of unknown criterion value
@dawagner dawagner merged commit f39078a into intel:master Jan 29, 2015
@krocard krocard deleted the Fix_error_message_in_case_of_unknown_criterion_value branch February 20, 2015 14:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants