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

C API: document error handling #11017

Open
ehmry opened this issue Jul 3, 2024 · 1 comment
Open

C API: document error handling #11017

ehmry opened this issue Jul 3, 2024 · 1 comment
Labels
c api Nix as a C library with a stable interface documentation regression Something doesn't work anymore

Comments

@ehmry
Copy link
Contributor

ehmry commented Jul 3, 2024

The documentation on the C API should also include error handling because there are too many ways to imagine how it works. If a procedure returns nix_err I don't know if that means without a context it will just throw an exception, and if a context is set I don't know if the context will carry the same error as the one returned.

Perhaps it would be useful to handler errors at a context using a callback? This would allow bindings to throw errors as their own native exceptions.

@ehmry ehmry added the feature Feature request or proposal label Jul 3, 2024
@roberth roberth added documentation regression Something doesn't work anymore c api Nix as a C library with a stable interface and removed feature Feature request or proposal labels Jul 3, 2024
@roberth
Copy link
Member

roberth commented Jul 3, 2024

It looks like the main page is broken

We do have this, but we can't really expect anyone to find it without a main page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c api Nix as a C library with a stable interface documentation regression Something doesn't work anymore
Projects
None yet
Development

No branches or pull requests

2 participants