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

validation: error message for failing regcomp poor #2660

Open
markus2330 opened this issue May 2, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@markus2330
Copy link
Contributor

commented May 2, 2019

Steps to Reproduce the Problem

Write a specification where a regular expression does not compile.

Expected Result

That the error message contains which regular expression caused the problem. E.g.

Reason: The regex '123{1' of the key 'system/some/key' did not compile because: 'Invalid range end'

Actual Result

Sorry, the error (#41) occurred ;(
Description: could not compile regex
Reason: Invalid range end
Ingroup: plugin
Module: validator
At: /builddir/build/BUILD/elektra-0.8.26/src/plugins/validation/validation.c:114
Mountpoint: system/sw/ep2/hook/stud/x
Configfile: /tmp/tmp.baq2YNHBRj/di11a/pre_eval_2.csv.16500:1556054054.876782.tmp'

System Information

  • Elektra Version: master
@kodebach

This comment has been minimized.

Copy link
Contributor

commented May 2, 2019

Just a note: This doesn't really require any general error message customization. We already have ELEKTA_SET_ERRORF that should be enough in this case...

@markus2330

This comment has been minimized.

Copy link
Contributor Author

commented May 2, 2019

Exactly, it should be an easy fix. keyName(key) and the regex is already available in that function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.