Engine_silk.NET/Nebulix/Rendering/Shaders/ShaderCompileException.cs
Daniel 3c598d57f3
Some checks failed
Gitea Actions Demo / Scan the project (push) Failing after 5s
Updated structure and took first steps for a better architecture
2023-12-22 20:18:47 +01:00

28 lines
959 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;
[Serializable]
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; }
protected ShaderCompileException(
System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
public override string ToString()
{
return $"Type of Shader: '{_shaderType}'" + "\n" + Message;
}
}