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

lib: remove Failure "hd" exceptions #58

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

psafont
Copy link
Member

@psafont psafont commented Nov 16, 2023

Instead raise the semantically correct No_RRA_available.

There's one last List.hd in the code, but it's correctly guarded so it cannot ever be used with an empty list.

Copy link
Contributor

@edwintorok edwintorok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also need to enable stacktraces somehow so you can see where these are raised?

Copy link
Contributor

@lindig lindig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe there is also code in xapi-rrdd with unprotected List.hd

Instead raise the semantically correct No_RRA_available.

There's one last List.hd in the code, but it's correctly guarded so it
cannot ever be used with an empty list.

Signed-off-by: Pau Ruiz Safont <[email protected]>
@psafont psafont merged commit 61d362a into xapi-project:master Nov 16, 2023
2 checks passed
@psafont psafont deleted the get-out-of-my branch November 16, 2023 15:04
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

Successfully merging this pull request may close these issues.

4 participants