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

report both the expression and the error message #46

Closed
dpinol opened this issue Nov 25, 2024 · 4 comments
Closed

report both the expression and the error message #46

dpinol opened this issue Nov 25, 2024 · 4 comments

Comments

@dpinol
Copy link
Contributor

dpinol commented Nov 25, 2024

It would be nice if there was a way so that...

julia> @check isempty(a) "invalid contents of X"

instead of causing this...

ERROR: CheckError: invalid contents of X

would cause..

ERROR: CheckError: invalid contents of X
isempty(a) must hold. Got
a => [2]
@jw3126
Copy link
Owner

jw3126 commented Nov 25, 2024

Yes, I think that would be more useful behavior.

@dpinol
Copy link
Contributor Author

dpinol commented Nov 25, 2024

cool, I can create a PR. Are you happy with concatenating the messages to have this behavior by default? Or would you prefer having a flag to enable/disable it?

dpinol pushed a commit to Avatar-Cognition/ArgCheck.jl that referenced this issue Nov 25, 2024
@dpinol
Copy link
Contributor Author

dpinol commented Nov 25, 2024

For the moment, I implemented it without a flag

jw3126 pushed a commit that referenced this issue Nov 25, 2024
* report both expression and error message (#46)

* v2.4.0

---------

Co-authored-by: Dani Pinyol <[email protected]>
@dpinol
Copy link
Contributor Author

dpinol commented Nov 28, 2024

merged, thanks

@dpinol dpinol closed this as completed Nov 28, 2024
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

No branches or pull requests

2 participants