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

Human-readable error messages #897

Open
real-or-random opened this issue Feb 19, 2021 · 1 comment
Open

Human-readable error messages #897

real-or-random opened this issue Feb 19, 2021 · 1 comment

Comments

@real-or-random
Copy link
Contributor

real-or-random commented Feb 19, 2021

#573 and a recent discussion on IRC show that it would be nice to have human-readable messages in some ARG_CHECK cases, e.g., when the context was created with the wrong flags.

[libsecp256k1] illegal argument: secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_ctx) is not exactly helpful to the user, and passing the wrong context is a likely mistake, not only for new users.
The same is true for example for !secp256k1_fe_is_zero(&ge->x) (in pubkey_load).

I believe for most ARG_CHECKs, it's not that big of an issue because they're of the form prealloc != NULL and this is easy to parse.

@memestylz

This comment has been minimized.

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