namespace Brutal.ShaderCApi; /// /// Base class of all shader exceptions. Captures the compiler diagnostic message from a /// at the point of construction. /// /// /// /// The exception does not take ownership of ; the caller remains /// responsible for disposing it. is evaluated /// eagerly during construction, so must still be valid at the point of /// throw. The captured message is the raw shaderc diagnostic text. /// /// /// /// The compilation result whose error message is captured. The exception does not take ownership; /// the caller remains responsible for disposing . The message is read /// eagerly at construction time, so the result must still be valid at the point of throw. /// public class ShaderException(in CompilationResult result) : Exception(result.GetErrorMessage()); /// /// Triggers when the shader stage could not be inferred from the source code. /// public class ShaderInvalidStageException(in CompilationResult result) : ShaderException(result); /// /// Triggers when the shader compilation failed. /// public class ShaderCompilationException(in CompilationResult result) : ShaderException(result); /// /// Triggers when the shader compiler encountered an internal error. /// public class ShaderInternalException(in CompilationResult result) : ShaderException(result); /// /// Triggers when the shader compiler returned a null result object. /// public class ShaderNullResultObjectException(in CompilationResult result) : ShaderException(result); /// /// Triggers when the SPIR-V assembly is invalid. /// public class ShaderInvalidAssemblyException(in CompilationResult result) : ShaderException(result); /// /// Triggers when SPIR-V validation failed (when validation is enabled). /// public class ShaderValidationException(in CompilationResult result) : ShaderException(result); /// /// Triggered when transformation to SPIR-V failed. /// public class ShaderTransformationException(in CompilationResult result) : ShaderException(result); /// /// Triggered when configuration of the shader compiler is invalid. /// public class ShaderConfigurationException(in CompilationResult result) : ShaderException(result);