using System;
namespace ComputeSharp.Exceptions;
///
/// A custom that indicates when an HLSL-only API is called from C#.
///
public sealed class InvalidExecutionContextException : InvalidOperationException
{
///
/// Creates a new instance.
///
/// The member name of the invoked API.
internal InvalidExecutionContextException(string memberName)
: base("The invoked API can only be used from within an HLSL shader.")
{
MemberName = memberName;
}
///
/// The name of the member that was incorrectly invoked.
///
public string MemberName { get; }
}