From b9aad6649e3ba0186e17fc035d4b56f8e6169b59 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Wed, 6 Aug 2025 23:16:56 +0000 Subject: Add Discord server link to Slang internal error messages (#8026) * Initial plan * Add Discord server link to Slang internal error messages Co-authored-by: aidanfnv <198290069+aidanfnv@users.noreply.github.com> * Format code according to Slang coding standards Co-authored-by: aidanfnv <198290069+aidanfnv@users.noreply.github.com> * Update Discord URL and message format for error diagnostics - Changed Discord URL from discord.gg/slang to khr.io/slangdiscord - Updated message format to "For assistance, file an issue on GitHub (...) or join the Slang Discord (...)" - Applied changes to all internal error diagnostics: unimplemented, unexpected, internalCompilerError, compilationAborted, compilationAbortedDueToException Co-authored-by: aidanfnv <198290069+aidanfnv@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: aidanfnv <198290069+aidanfnv@users.noreply.github.com> Co-authored-by: aidanfnv --- source/slang/slang-diagnostic-defs.h | 38 +++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) (limited to 'source/slang') diff --git a/source/slang/slang-diagnostic-defs.h b/source/slang/slang-diagnostic-defs.h index 8f4845421..e9c8acfe3 100644 --- a/source/slang/slang-diagnostic-defs.h +++ b/source/slang/slang-diagnostic-defs.h @@ -2999,15 +2999,43 @@ DIAGNOSTIC( // 99999 - Internal compiler errors, and not-yet-classified diagnostics. -DIAGNOSTIC(99999, Internal, unimplemented, "unimplemented feature in Slang compiler: $0") -DIAGNOSTIC(99999, Internal, unexpected, "unexpected condition encountered in Slang compiler: $0") -DIAGNOSTIC(99999, Internal, internalCompilerError, "Slang internal compiler error") -DIAGNOSTIC(99999, Error, compilationAborted, "Slang compilation aborted due to internal error") +DIAGNOSTIC( + 99999, + Internal, + unimplemented, + "unimplemented feature in Slang compiler: $0\nFor assistance, file an issue on GitHub " + "(https://github.com/shader-slang/slang/issues) or join the Slang Discord " + "(https://khr.io/slangdiscord)") +DIAGNOSTIC( + 99999, + Internal, + unexpected, + "unexpected condition encountered in Slang compiler: $0\nFor assistance, file an issue on " + "GitHub " + "(https://github.com/shader-slang/slang/issues) or join the Slang Discord " + "(https://khr.io/slangdiscord)") +DIAGNOSTIC( + 99999, + Internal, + internalCompilerError, + "Slang internal compiler error\nFor assistance, file an issue on GitHub " + "(https://github.com/shader-slang/slang/issues) or join the Slang Discord " + "(https://khr.io/slangdiscord)") +DIAGNOSTIC( + 99999, + Error, + compilationAborted, + "Slang compilation aborted due to internal error\nFor assistance, file an issue on GitHub " + "(https://github.com/shader-slang/slang/issues) or join the Slang Discord " + "(https://khr.io/slangdiscord)") DIAGNOSTIC( 99999, Error, compilationAbortedDueToException, - "Slang compilation aborted due to an exception of $0: $1") + "Slang compilation aborted due to an exception of $0: $1\nFor assistance, file an issue on " + "GitHub " + "(https://github.com/shader-slang/slang/issues) or join the Slang Discord " + "(https://khr.io/slangdiscord)") DIAGNOSTIC( 99999, Internal, -- cgit v1.2.3