1use thiserror::Error;
4
5#[derive(Error, Debug)]
10#[non_exhaustive]
11pub enum Error {
12 #[error("Plugin not found: {0}")]
14 PluginNotFound(String),
15
16 #[error("Failed to load plugin: {0}")]
18 PluginLoadFailed(String),
19
20 #[error("Plugin crashed")]
22 PluginCrashed,
23
24 #[error("Plugin operation timed out")]
26 PluginTimeout,
27
28 #[error("Invalid parameter: {0}")]
30 InvalidParameter(String),
31
32 #[error("Audio backend error: {0}")]
34 AudioBackendError(String),
35
36 #[error("MIDI error: {0}")]
38 MidiError(String),
39
40 #[error("VST3 interface error: {0}")]
42 InterfaceError(String),
43
44 #[error("Process isolation error: {0}")]
46 ProcessError(String),
47
48 #[error(transparent)]
50 IoError(#[from] std::io::Error),
51
52 #[error("{0}")]
54 Other(String),
55}
56
57pub type Result<T> = std::result::Result<T, Error>;