#[derive(Debug, thiserror::Error)]
pub(crate) enum WasmError {
#[cfg(feature = "parser")]
#[error("Entry file '{0}' not found")]
MissingEntry(String),
#[cfg(feature = "parser")]
#[error("{0}")]
Parse(#[from] webui_parser::ParserError),
#[error("Protocol error: {0}")]
Protocol(#[from] webui_protocol::ProtocolError),
#[cfg(feature = "handler")]
#[error("State JSON error: {0}")]
State(serde_json::Error),
#[cfg(feature = "handler")]
#[error("{0}")]
Render(#[from] webui_handler::HandlerError),
#[cfg(feature = "handler")]
#[error("Unknown plugin: {0}. Use \"webui\", \"fast-v3\", \"fast-v2\", or \"fast\".")]
UnknownPlugin(String),
#[cfg(feature = "handler")]
#[error("Invalid render options: {0}")]
InvalidOptions(String),
}