use thiserror::Error;
#[derive(Error, Debug)]
#[non_exhaustive]
pub enum Error {
#[error("Plugin not found: {0}")]
PluginNotFound(String),
#[error("Failed to load plugin: {0}")]
PluginLoadFailed(String),
#[error("Plugin crashed")]
PluginCrashed,
#[error("Plugin operation timed out")]
PluginTimeout,
#[error("Invalid parameter: {0}")]
InvalidParameter(String),
#[error("Audio backend error: {0}")]
AudioBackendError(String),
#[error("MIDI error: {0}")]
MidiError(String),
#[error("VST3 interface error: {0}")]
InterfaceError(String),
#[error("Process isolation error: {0}")]
ProcessError(String),
#[error(transparent)]
IoError(#[from] std::io::Error),
#[error("{0}")]
Other(String),
}
pub type Result<T> = std::result::Result<T, Error>;