diff --git a/src/ComputeSharp.Core/Exceptions/InvalidExecutionContextException.cs b/src/ComputeSharp.Core/Exceptions/InvalidExecutionContextException.cs index b8661343..269e1c65 100644 --- a/src/ComputeSharp.Core/Exceptions/InvalidExecutionContextException.cs +++ b/src/ComputeSharp.Core/Exceptions/InvalidExecutionContextException.cs @@ -3,16 +3,22 @@ using System; namespace ComputeSharp.Exceptions; /// -/// A custom that indicates when an HLSL-only API is called from C# +/// A custom that indicates when an HLSL-only API is called from C#. /// public sealed class InvalidExecutionContextException : InvalidOperationException { /// /// Creates a new instance. /// - /// The name of the caller API. - internal InvalidExecutionContextException(string name) - : base($"The API {name} can only be used from within an HLSL shader.") + /// The member name of the caller API. + internal InvalidExecutionContextException(string memberName) + : base($"The API {memberName} can only be used from within an HLSL shader.") { + MemberName = memberName; } + + /// + /// The name of the member that was incorrectly invoked. + /// + public string MemberName { get; } } \ No newline at end of file