diff options
| author | Zeyla Hellyer <[email protected]> | 2017-06-06 20:10:25 -0700 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-06-06 20:10:25 -0700 |
| commit | 858bbf298d08ada3ae6c5b24105bf751bc938d5e (patch) | |
| tree | b9be86c16c1bc8e7cb130a03ac31ec0ec56193a8 /src/client/error.rs | |
| parent | Make client join shards and return (diff) | |
| download | serenity-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.rs | 4 |
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", } } } |