Engine_silk.NET/Nebulix/Rendering/Shaders/ShaderCompileException.cs
Daniel 049d8cff7e
All checks were successful
Gitea Actions Demo / Scan the project (push) Successful in 21s
Fixed sonar qube errors
2024-01-02 16:17:39 +01:00

24 lines
760 B
C#

using Silk.NET.OpenGL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Nebulix.Rendering;
public class ShaderCompileException : Exception
{
protected ShaderType ShaderType;
public ShaderCompileException(ShaderType shaderType) : base("Unable to compile shader.") { ShaderType = shaderType; }
public ShaderCompileException(ShaderType shaderType, string message) : base(message) { ShaderType = shaderType; }
public ShaderCompileException(ShaderType shaderType, string message, Exception inner) : base(message, inner) { ShaderType = shaderType; }
public override string ToString()
{
return $"Type of Shader: '{ShaderType}'" + "\n" + Message;
}
}