Added InvalidExecutionContextException

このコミットが含まれているのは:
Sergio Pedri committed 2019-08-20 01:54:01 +02:00
1 親 97bf95484f
コミット 73709e954c
5ファイル変更
+28 -9

検索条件に一致するファイルはありません

+19
ファイルの表示
@@ -0,0 +1,19 @@
using System;
using System.Runtime.CompilerServices;
namespace ComputeSharp.Graphics.Exceptions
{
/// <summary>
/// A custom <see cref="InvalidOperationException"/> that indicates when an HLSL-only API is called from C#
/// </summary>
public sealed class InvalidExecutionContextException : InvalidOperationException
{
/// <summary>
/// Creates a new <see cref="InvalidExecutionContextException"/> instance
/// </summary>
/// <param name="name">The name of the caller API</param>
internal InvalidExecutionContextException([CallerMemberName] string? name = null)
: base($"The API {name} can only be used from within an HLSL shader")
{ }
}
}