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

search: provide a better error when regex is incorrect #4393

Closed
yarikoptic opened this issue Apr 10, 2020 · 3 comments
Closed

search: provide a better error when regex is incorrect #4393

yarikoptic opened this issue Apr 10, 2020 · 3 comments
Assignees
Labels
enhancement UX user experience

Comments

@yarikoptic
Copy link
Member

Although it is quite easy to grasp what went wrong familiar with python

$> datalad search path:*T1w.nii.gz
[ERROR  ] nothing to repeat at position 0 [sre_parse.py:_parse:651] (error)

I think a better error would be

[ERROR ] regular expression '*T1w.nii.gz' is incorrect:  nothing to repeat at position 0 [search.py:...] (error)

which would become especially useful in case of multiple regular expressions and more tricky ones

@adswa
Copy link
Member

adswa commented Apr 14, 2020

I think your merged PR that fixed this for some reason did not automatically close this issue? I will close it, please reopen if I'm mistaken here. PS: I like the improved error message :)

@adswa adswa closed this as completed Apr 14, 2020
@kyleam
Copy link
Contributor

kyleam commented Apr 14, 2020

Thanks @adswa

I think your merged PR that fixed this for some reason did not automatically close this issue?

When a PR is based off of a branch other than the default branch of the repo, the closes/fixes cookie needs to be in a commit message, not just the PR description.

@adswa
Copy link
Member

adswa commented Apr 14, 2020

Thank you for sharing, I did not know this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement UX user experience
Projects
None yet
Development

No branches or pull requests

3 participants