34 lines
655 B
Rust
34 lines
655 B
Rust
use thiserror::Error;
|
|
|
|
pub type Result<T = ()> = std::result::Result<T, Error>;
|
|
|
|
#[derive(Error, Debug)]
|
|
pub enum Error {
|
|
#[error("Invalid Snippet {0}")]
|
|
InvalidSnippet(String),
|
|
|
|
#[error("Invalid Shader {0}")]
|
|
InvalidShader(String),
|
|
|
|
#[error("Invalid Program {0}")]
|
|
InvalidProgram(String),
|
|
|
|
#[error("Error: {0}")]
|
|
InvalidDataType(String),
|
|
|
|
#[error("Init Error, cause of {0}")]
|
|
InitError(anyhow::Error),
|
|
|
|
#[error("Invalid Font {0}")]
|
|
FontError(String),
|
|
|
|
#[error("Invalid Setting {0}")]
|
|
SettingError(String),
|
|
|
|
#[error("IO Error")]
|
|
IO {
|
|
#[from]
|
|
source: std::io::Error,
|
|
},
|
|
}
|