summaryrefslogtreecommitdiffstats
path: root/source/slang
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 /source/slang
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 'source/slang')
-rw-r--r--source/slang/slang-api.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/slang/slang-api.cpp b/source/slang/slang-api.cpp
index 18d2a5083..e510fc9a2 100644
--- a/source/slang/slang-api.cpp
+++ b/source/slang/slang-api.cpp
@@ -3,6 +3,7 @@
#include "../core/slang-performance-profiler.h"
#include "../core/slang-rtti-info.h"
#include "../core/slang-shared-library.h"
+#include "../core/slang-signal.h"
#include "../slang-record-replay/record/slang-global-session.h"
#include "../slang-record-replay/util/record-utility.h"
#include "slang-capability.h"
@@ -173,6 +174,11 @@ SLANG_API SlangResult slang_createGlobalSessionWithoutCoreModule(
return SLANG_OK;
}
+SLANG_API const char* slang_getLastInternalErrorMessage()
+{
+ return Slang::getLastSignalMessage();
+}
+
SLANG_API void spDestroySession(SlangSession* inSession)
{
if (!inSession)