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

[FEATURE] Handle errorneous flag evaluation without exceptions #466

Open
aepfli opened this issue Mar 17, 2025 · 0 comments · May be fixed by #474
Open

[FEATURE] Handle errorneous flag evaluation without exceptions #466

aepfli opened this issue Mar 17, 2025 · 0 comments · May be fixed by #474
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@aepfli
Copy link
Member

aepfli commented Mar 17, 2025

So far, we used exceptions to handle our flow control, but Exceptions are costly. In the end, we enriched our
evaluation Details with errorCode and errorMessage. If desired, the providers can also handle this to reduce the execution footprint in erroneous cases, which don't have to be exceptions. Till now, we also converted those into exceptions and threw them, with a little code change, we would return already the details, and call the hooks, without exceptions being thrown.

For example, FlagNotFound is such a case; it can be expected and not exceptional. Hence, the exception flow might add too much overhead to performance-critical environments.

This implementation allows the prover implementors to decide whether to support either or both.

In Java and JavaScript we are doing this already see java pr

@beeme1mr beeme1mr added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants