Human-readable error messages #897

issue real-or-random opened this issue on February 19, 2021
  1. real-or-random commented at 10:43 AM on February 19, 2021: contributor

    #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.

  2. memestylz commented at 7:26 PM on February 19, 2021: none

    #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.

    Did you guys get everything you need


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-01 14:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me