You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behavior
Currently the various libunbound functions report failures via UB_* constants, which unbound.h doesn’t expose. It would be helpful for error handling to have those constants in 3rd-party applications.
Describe the desired feature
Put enum ub_ctx_err into unbound.h so 3rd party apps can access it.
Potential use-case
If I want to translate the errors or otherwise recover from them it’s good to have error codes instead. And it’s ideal not to have to copy-paste them from context.h into my own code.
I’m happy to submit a PR to do this, if it’s an agreeable proposal.
Thank you!
The text was updated successfully, but these errors were encountered:
Sure, initially wanted to hide these internal details, and expose only the ub_strerror function. Moved the enum to the unbound.h file. Where the enum exists for the purpose of defining the constants only. The enum itself is not used, also not in the source of unbound, so it could really also be a list of #define statements. And use type int for the error return, the enum is not intended to be used as the type for the error codes, only to list the constants.
Current behavior
Currently the various libunbound functions report failures via UB_* constants, which unbound.h doesn’t expose. It would be helpful for error handling to have those constants in 3rd-party applications.
Describe the desired feature
Put
enum ub_ctx_err
into unbound.h so 3rd party apps can access it.Potential use-case
If I want to translate the errors or otherwise recover from them it’s good to have error codes instead. And it’s ideal not to have to copy-paste them from context.h into my own code.
I’m happy to submit a PR to do this, if it’s an agreeable proposal.
Thank you!
The text was updated successfully, but these errors were encountered: