While working on the tutorial I noticed that result codes aren't always checked. All samples (that present) use e.g. this line of code:
auto [result, imageIndex] = swapChain.acquireNextImage(UINT64_MAX, *presentCompleteSemaphores[frameIndex], nullptr);`
But result is never checked and overwritten by another call a few lines later, so errors in this line aren't catched in a graceful manner.
A tutorial should teach proper error handling, so we should add proper error handling.
While working on the tutorial I noticed that result codes aren't always checked. All samples (that present) use e.g. this line of code:
But
resultis never checked and overwritten by another call a few lines later, so errors in this line aren't catched in a graceful manner.A tutorial should teach proper error handling, so we should add proper error handling.