]> code.octet-stream.net Git - m17rt/blob - m17codec2/src/error.rs
Split m17codec2 into modules
[m17rt] / m17codec2 / src / error.rs
1 use thiserror::Error;
2
3 #[derive(Debug, Error)]
4 pub enum M17Codec2Error {
5 #[error("selected card '{0}' does not exist or is in use")]
6 CardUnavailable(String),
7
8 #[error("default output card is unavailable")]
9 DefaultCardUnavailable,
10
11 #[error("selected card '{0}' failed to list available output configs: '{1}'")]
12 OutputConfigsUnavailable(String, #[source] cpal::SupportedStreamConfigsError),
13
14 #[error("selected card '{0}' did not offer a compatible output config type, either due to hardware limitations or because it is currently in use")]
15 SupportedOutputUnavailable(String),
16
17 #[error("selected card '{0}' was unable to build an output stream: '{1}'")]
18 OutputStreamBuildError(String, #[source] cpal::BuildStreamError),
19
20 #[error("selected card '{0}' was unable to play an output stream: '{1}'")]
21 OutputStreamPlayError(String, #[source] cpal::PlayStreamError),
22 }