summaryrefslogtreecommitdiffstats
path: root/tools/render-test/shader-input-layout.cpp
diff options
context:
space:
mode:
authorTim Foley <tfoley@nvidia.com>2020-01-09 11:26:06 -0800
committerTim Foley <tfoley@nvidia.com>2020-01-09 11:26:06 -0800
commit63bed4c37199f2436c81089a08834d7b58b8e576 (patch)
treeb9095e1206c20c9918716f247f5d15e95f62aa21 /tools/render-test/shader-input-layout.cpp
parent0a856f458ff9f17d76bc646d008602713c6c66d1 (diff)
Catch exceptions inside FindTypeByName()
If `spReflection_FindTypeByName` is called with a string that refers to the name of a variable instead of a type, then it ends up causing a fatal error to be diagnosed, leading to an `AbortCompilationException` being thrown. This exception then propagates up to the application that called `spReflection_FindTypeByName()`, which actually violates the contract for our `extern "C"` API. This change adds a wrapper `try`/`catch` around the meat of the operation and turns any exception into a null result (this function has no other way to report errors to the caller). It would be nice for a separate change to make the error message that caused the problem non-fatal, but that is orthogonal to this fix.
Diffstat (limited to 'tools/render-test/shader-input-layout.cpp')
0 files changed, 0 insertions, 0 deletions