-
Notifications
You must be signed in to change notification settings - Fork 50
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
noncliff: enhanced error message for inapplicable Project! of GeneralizedStabilizer #416
Merged
Merged
Changes from 2 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ba1d34a
noncliff: better error message for inapplicable project! of Generaliz…
Fe-r-oz aa63d6a
improve formatting w.r.t to console output
Fe-r-oz 0fbea7d
Merge branch 'nonclif' into fa/errormsgproj
Fe-r-oz a8a8589
add wonderful code review suggestion
Fe-r-oz b4f839c
fix doctest
Fe-r-oz 80e9981
since invsparsity is private, fix the doctest errors using QuantumCli…
Fe-r-oz 0c2a527
improve doctest quality
Fe-r-oz 8f45805
remove unnecessary namespace redirection
Krastanov cb10d81
use the correct arguments for constructing the method error
Krastanov a1d135e
print the hint only for the appropriate project! method (otherwise it…
Krastanov 83fd026
simplify message and multi-line printing syntax
Krastanov 087edb6
add tests
Krastanov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be done a bit more neatly using
MethodError
and a registered error hint.E.g. throw
throw(MethodError(f, (sm,p)))
where sm and p are the arguments to this function.Then use
register_error_hint
to register the additional explanation message: https://docs.julialang.org/en/v1.12-dev/base/base/#Base.Experimental.register_error_hintThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for the suggestion!