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

Add quilc_last_error function #894

Merged
merged 4 commits into from
Aug 3, 2023

Conversation

notmgsk
Copy link
Member

@notmgsk notmgsk commented Aug 1, 2023

Modelled after e.g. dlerror, the most recent error raised by quilc is captured in *quilc-last-error*. Calling quilc-last-error (or quilc_last_error depending on language) will

  1. return the value in *quilc-last-error*; and
  2. set *quilc-last-error* to "".

Obviously no guarantees around thread safety.

stylewarning
stylewarning previously approved these changes Aug 2, 2023
notmgsk added 2 commits August 2, 2023 14:42
It returns the lastest Quilc error, and then resets the error cache
to an empty string.
@stylewarning stylewarning merged commit b9f90cf into quil-lang:master Aug 3, 2023
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

Successfully merging this pull request may close these issues.

2 participants