mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-28 12:07:48 -06:00
refactor(engine): move error, services, document state, event, fonts and Session methods out of lib.rs
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum EngineError {
|
||||
#[error("unknown command `{0}`")]
|
||||
UnknownCommand(String),
|
||||
#[error("command `{0}` is not available right now: {1}")]
|
||||
Disabled(String, String),
|
||||
#[error("invalid parameters for `{cmd}`: {msg}")]
|
||||
BadParams { cmd: String, msg: String },
|
||||
#[error("no active composition")]
|
||||
NoComp,
|
||||
/// A `comp` reference (name or id) that names no composition.
|
||||
#[error("no composition {0}")]
|
||||
NoSuchComp(String),
|
||||
#[error("{0}")]
|
||||
Project(#[from] effectcraft_project::ProjectError),
|
||||
#[error("{0}")]
|
||||
Other(String),
|
||||
}
|
||||
|
||||
pub type Result<T> = std::result::Result<T, EngineError>;
|
||||
Reference in New Issue
Block a user