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

Support returning errors from query API #15

Open
danobi opened this issue Jul 14, 2020 · 1 comment
Open

Support returning errors from query API #15

danobi opened this issue Jul 14, 2020 · 1 comment

Comments

@danobi
Copy link
Member

danobi commented Jul 14, 2020

The query API is iterator based. Each iteration is technically fallible but there's no great way to report errors.

I played around with making the iterator type by Result<T> but that can cause infinite loops: 24aa7ea .

Not sure what can be done about it. Maybe https://docs.rs/fallible-iterator/0.2.0/fallible_iterator/ but that library isn't very nice b/c it reimplements much of the iterator standard library helpers.

@kckeiks
Copy link
Contributor

kckeiks commented Mar 8, 2022

How do your proposed changes cause an infinite loop? Shouldn't we stop when bpf_obj_get_next_id returns a non-zero value?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants