Skip to content
This repository has been archived by the owner on Jul 29, 2021. It is now read-only.

Tutorial uses assert for real runtime errors #183

Open
krOoze opened this issue Sep 3, 2018 · 0 comments
Open

Tutorial uses assert for real runtime errors #183

krOoze opened this issue Sep 3, 2018 · 0 comments

Comments

@krOoze
Copy link
Contributor

krOoze commented Sep 3, 2018

The tutorial uses assert from <assert.h> for real runtime errors.

Many VK_ERROR_* are "real" runtime errors, and not logical errors. Therefore it is not valid to use assert, which only executes in the debug build.

Things like OOM errors need to be caught in the release build too in order for the app to handle them graciously and not enter undefined behavior.

http://www.cplusplus.com/reference/cassert/assert/ :

Therefore, this macro is designed to capture programming errors, not user or run-time errors, since it is generally disabled after a program exits its debugging phase.

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

No branches or pull requests

1 participant