Skip to content

Commit

Permalink
Improved error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
s-macke committed Jun 26, 2024
1 parent 46dfb69 commit 910097b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/scripts/RunGPURunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,16 @@ async function HandleAsyncAnimation(runner: GPURunner) {
})
}
} catch (e) {
await GPU.device.queue.onSubmittedWorkDone()
ShowError("GPU error", e as Error)
await runner.Destroy()
resolve(0)
throw e
}
MeasureIteration(nIter)
if (stop_immediately) {
// make sure, that nothing is in the queue
await GPU.device.queue.onSubmittedWorkDone()
await GPU.device.queue.onSubmittedWorkDone()
await runner.Destroy()
document.getElementById("textFps").innerHTML = ""
Expand Down

0 comments on commit 910097b

Please sign in to comment.