-
Notifications
You must be signed in to change notification settings - Fork 302
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
Vulkan-Hpp specific exception classes #97
Comments
I think, this is a good idea. I will introduce them in the next couple of days. |
I'm glad you liked it. I was thinking on how this should be implemented because standard exception classes doesn't inherit virtually, so we can't simply make:
and I've came up with couple ideas but none were perfect. Above implementation tries to:
It's not perfect but without virtual inheritance between STL exceptions I think we can't do better. P.S. I haven't updated |
Regarding the changes on every line: this is probably due to a different end-of-line setting on your end. We're using CR/LF (Windows-style). |
Resolved with pull-request #99. |
What do you think about adding custom exception/error classes derived from one of the
std::exception
derived classes? Currently without special filtering developer can't really know if given exception (likestd::system_error
was thrown by Vulkan-Hpp or other piece of code and with that developers would be able to use natural exceptions "filtering" like:Since exceptions already add some small overhead (mostly when fired), maybe we could also add hierarchy of exceptions representing some scenarios based on VkResult return value like
That way some errors might be handled right away and others might for example terminate application.
Worst case you could still catch them by
std::exception
or another STD-base-class.The text was updated successfully, but these errors were encountered: