]> git.ipfire.org Git - thirdparty/FORT-validator.git/commit
Patch FIXME: Review usage of enomem_panic()
authorAlberto Leiva Popper <ydahhrk@gmail.com>
Thu, 23 Nov 2023 17:59:56 +0000 (11:59 -0600)
committerAlberto Leiva Popper <ydahhrk@gmail.com>
Thu, 23 Nov 2023 18:59:18 +0000 (12:59 -0600)
commit80f059126d2008ba917576c29d204ea0c91e0dc2
treeefe44079f6ea5ea859df2f7100fd36391ceb6c0a
parentde3b232be91e2eccd8446ec011b7cccc28af3ae7
Patch FIXME: Review usage of enomem_panic()

Geezus.

I'm finding lots of problems with the error reports:

- Some error messages are getting logged with what appears to be the
  wrong severity, variant (normal vs libcrypto) or type (val vs op).
  Also, the line between val and op is sometimes blurry.
- Some error messages are extremely ambiguous, which makes them useless.
  It's hard to fix them because they tend to be caused by library utils
  that either refuse to spit details, or export them through
  undocumented, unreliable and/or inconsistent means.
- Another consequence of the generic errors is that it's hard to tell
  the ENOMEMs apart, which sucks because we're supposed to handle them
  differently.
- Some error messages aren't printing the offending function arguments,
  which will make them hard to debug when they happen.

I'm anticipating another redesign of the framework, but I'm also trying
very hard not to do any new major rewrites before the next release.
16 files changed:
src/crypto/base64.c
src/crypto/base64.h
src/daemon.c
src/http/http.c
src/log.c
src/object/certificate.c
src/object/manifest.c
src/object/tal.c
src/output_printer.c
src/resource.c
src/rrdp.c
src/rtr/rtr.c
src/slurm/db_slurm.c
src/slurm/slurm_parser.c
src/str_token.c
test/rrdp_test.c