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
Currently, the error type is just a wrapper around String and the functions do not have descriptions on how they might fail either. It would be nice to have some information on error handling.
The text was updated successfully, but these errors were encountered:
Thanks for the report.
Generally speaking errors can come from 1) a mix of several kernel syscalls, or 2) improper API usage.
The latter is more or less already documented directly on the helpers, see for example caps::clear() docstring which states It cannot manipulate Ambient or Bounding set of other processes. If it isn't discoverable, I'm happy to take suggestions/improvements.
The former is instead a non-exhaustive set, as it depends on the specific kernel runtime. Syscalls can fail in many different ways which also vary across kernel version and build-configuration. And a single Rust method can dispatch to several different syscalls internally, thus we don't expose raw errno.
Generally speaking errors from this library are meant to be human-consumed. I'm happy to add more context to improve that side, but I'm not going to try to map all possible errors into Rust variants due to the above points.
If you encountered some error condition that could be probed upfront, we can consider adding an helper to the runtime module.
Currently, the error type is just a wrapper around String and the functions do not have descriptions on how they might fail either. It would be nice to have some information on error handling.
The text was updated successfully, but these errors were encountered: