-
Notifications
You must be signed in to change notification settings - Fork 2
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
Plonk: error handling #57
Comments
I am facing the following problem addressing this issue:
I transform this into
Next I catch the exception in the caller https://github.com/clearmatics/libsnark/blob/plonk/libsnark/zk_proof_systems/plonk/prover.tcc#L1039-L1040 where instead of
I do
As can be seen, for the above to work we need to declare an empty constructor for the struct Do you have a better suggestion how to catch the exception by the caller without having the above problem? |
As discussed elsewhere, please remove all Regarding the first transformation, you appear to have a try with no catch. Regarding the problem of scope and the variable initialization (if you hypothetically wanted to catch exceptions here, which I don't think we do) you would probably want to enclose a larger block of code in the Let's discuss if this doesn't mkae sense or if I've missed something. |
Yes, that makes sense. Thanks for the clarification! I'll remove all For example, https://github.com/clearmatics/libsnark/blob/plonk/libsnark/zk_proof_systems/plonk/prover.tcc#L446-L453
will be replaced by
|
… thrown exceptions. addresses issue #57
That change was applied and committed. |
… thrown exceptions. addresses issue #57
… thrown exceptions. addresses issue #57
Issue description (bullet 8): When throwing an exception, it should not be up to the function that throws it to decide how it should be handled. Catch and handle must be done by the caller instead, who may wish to handle it in some way other than exiting the process, like retrying. See #49 (comment) , #49 (comment) , #49 (comment)
The text was updated successfully, but these errors were encountered: