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; } }