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

Box ValidationError #2253

Merged
merged 1 commit into from
Jul 6, 2023
Merged

Conversation

Rua
Copy link
Contributor

@Rua Rua commented Jul 6, 2023

Changelog:

Changes to errors:
- - `VulkanError` is renamed to `RuntimeError`.
- - Added new types `ValidationError` and `VulkanError` (enum of `ValidationError` + `RuntimeError`) to return errors from any function. Some existing functions have been converted to use these types, others will follow later.
+ - Added new types `ValidationError` and `Validated` (enum of `ValidationError` + something else) to return errors from any function. Some existing functions have been converted to use these types, others will follow later.

Fixes #2251. I've also un-renamed RuntimeError back to VulkanError, as I wasn't quite happy with that change in the end. I made the combo enum generic, so that it can be used for error types other than VulkanError.

@marc0246
Copy link
Contributor

marc0246 commented Jul 6, 2023

Really there should be a blanket impl

impl<E> From<E> for Validated<E> { ... }

I feel like.

@Rua
Copy link
Contributor Author

Rua commented Jul 6, 2023

I tried that, but it conflicts with the From<ValidationError> impl.

@marc0246
Copy link
Contributor

marc0246 commented Jul 6, 2023

I see, thanks.

@marc0246 marc0246 merged commit b74ce40 into vulkano-rs:master Jul 6, 2023
marc0246 added a commit that referenced this pull request Jul 6, 2023
@Rua Rua deleted the boxed-validationerror branch October 25, 2023 14:25
hakolao pushed a commit to hakolao/vulkano that referenced this pull request Feb 20, 2024
hakolao pushed a commit to hakolao/vulkano that referenced this pull request Feb 20, 2024
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.

Consider boxing errors more
2 participants