summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSimon Kallweit <64953474+skallweitNV@users.noreply.github.com>2024-12-06 00:46:56 +0100
committerGitHub <noreply@github.com>2024-12-05 18:46:56 -0500
commitd4136c93448bfdd8561af331ea6eebcec14719e3 (patch)
tree7c12987a4dd4a5f92fdcc74ac800ea869f03fe13 /include
parentce23f078781ae977d827a559e775250dc429709c (diff)
Add API for getting last internal error message (#5772)
* Add API for getting last internal error message * format code (#5773) Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> * make message thread_local --------- Co-authored-by: slangbot <ellieh+slangbot@nvidia.com> Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to 'include')
-rw-r--r--include/slang.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/slang.h b/include/slang.h
index ee9fb7650..2dfee6b28 100644
--- a/include/slang.h
+++ b/include/slang.h
@@ -4415,6 +4415,10 @@ SLANG_API ISlangBlob* slang_getEmbeddedCoreModule();
*/
SLANG_EXTERN_C SLANG_API void slang_shutdown();
+/* Return the last signaled internal error message.
+ */
+SLANG_EXTERN_C SLANG_API const char* slang_getLastInternalErrorMessage();
+
namespace slang
{
inline SlangResult createGlobalSession(slang::IGlobalSession** outGlobalSession)
@@ -4425,6 +4429,10 @@ inline void shutdown()
{
slang_shutdown();
}
+inline const char* getLastInternalErrorMessage()
+{
+ return slang_getLastInternalErrorMessage();
+}
} // namespace slang
#endif // C++ helpers