use crate::ctypes::ShaderStage;
use crate::shader::Target;
use crate::GlslProfile;
use thiserror::Error;
#[derive(Debug, Error)]
pub enum GlslangError {
#[error("preprocess error: {0}")]
PreprocessError(String),
#[error("parse error: {0}")]
ParseError(String),
#[error("map io error: {0}")]
MapIoError(String),
#[error("program link error: {0}")]
LinkError(String),
#[error("shader stage not found: {0:?}")]
ShaderStageNotFound(ShaderStage),
#[error("tried to compile shader with no language target")]
NoLanguageTarget,
#[error("the target is invalid")]
InvalidTarget(Target),
#[error("the profile is invalid")]
InvalidProfile(Target, i32, GlslProfile),
#[error("the profile is invalid")]
VersionUnsupported(i32, GlslProfile),
}