aboutsummaryrefslogtreecommitdiff
path: root/src/client/error.rs
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2017-06-06 20:10:25 -0700
committerZeyla Hellyer <[email protected]>2017-06-06 20:10:25 -0700
commit858bbf298d08ada3ae6c5b24105bf751bc938d5e (patch)
treeb9be86c16c1bc8e7cb130a03ac31ec0ec56193a8 /src/client/error.rs
parentMake client join shards and return (diff)
downloadserenity-858bbf298d08ada3ae6c5b24105bf751bc938d5e.tar.xz
serenity-858bbf298d08ada3ae6c5b24105bf751bc938d5e.zip
Make client starts return an error
When returning, the Client would return an Ok(()). Instead, return an error, since there is currently no reason the client would return under "okay" circumstances.
Diffstat (limited to 'src/client/error.rs')
-rw-r--r--src/client/error.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/error.rs b/src/client/error.rs
index a08d15b..1a23599 100644
--- a/src/client/error.rs
+++ b/src/client/error.rs
@@ -21,6 +21,9 @@ pub enum Error {
/// When a shard has completely failed to reboot after resume and/or
/// reconnect attempts.
ShardBootFailure,
+ /// When all shards that the client is responsible for have shutdown with an
+ /// error.
+ Shutdown,
}
impl Display for Error {
@@ -34,6 +37,7 @@ impl StdError for Error {
match *self {
Error::InvalidToken => "The provided token was invalid",
Error::ShardBootFailure => "Failed to (re-)boot a shard",
+ Error::Shutdown => "The clients shards shutdown",
}
}
}