aboutsummaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2016-11-13 19:28:13 -0800
committerAustin Hellyer <[email protected]>2016-11-14 18:32:10 -0800
commit7d22fb2a9c70e5e517b359875a0157f72e352e43 (patch)
treeca3bcb3a76f68960563d3c38d45e21f493ce32f8 /src/error.rs
parentAdd internal module (diff)
downloadserenity-7d22fb2a9c70e5e517b359875a0157f72e352e43.tar.xz
serenity-7d22fb2a9c70e5e517b359875a0157f72e352e43.zip
Add voice connection support
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs
index 2e3ea07..97524b0 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -6,6 +6,8 @@ use serde_json::Error as JsonError;
use serde_json::Value;
use websocket::result::WebSocketError;
use ::client::{ClientError, ConnectionError};
+#[cfg(feature="voice")]
+use ::ext::voice::VoiceError;
/// The common result type between most library functions.
pub type Result<T> = ::std::result::Result<T, Error>;
@@ -40,6 +42,9 @@ pub enum Error {
Other(&'static str),
/// An error from the `url` crate.
Url(String),
+ /// Indicating an error within the voice module.
+ #[cfg(feature="voice")]
+ Voice(VoiceError),
/// An error from the `rust-websocket` crate.
WebSocket(WebSocketError),
}
@@ -91,6 +96,8 @@ impl StdError for Error {
Error::Json(ref inner) => inner.description(),
Error::Url(ref inner) => inner,
Error::WebSocket(ref inner) => inner.description(),
+ #[cfg(feature = "voice")]
+ Error::Voice(_) => "Voice error",
}
}