2019-03-03 22:02:38 +00:00
|
|
|
use common::net::PostError;
|
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub enum Error {
|
|
|
|
Network(PostError),
|
2019-04-10 17:23:27 +00:00
|
|
|
ServerWentMad,
|
2019-03-05 18:39:18 +00:00
|
|
|
ServerTimeout,
|
2019-03-03 22:02:38 +00:00
|
|
|
ServerShutdown,
|
2019-07-01 11:19:26 +00:00
|
|
|
TooManyPlayers,
|
2019-08-07 19:42:44 +00:00
|
|
|
InvalidAuth,
|
2019-07-05 12:16:08 +00:00
|
|
|
//TODO: InvalidAlias,
|
2019-03-03 22:02:38 +00:00
|
|
|
Other(String),
|
|
|
|
}
|
|
|
|
|
|
|
|
impl From<PostError> for Error {
|
2020-02-01 20:39:39 +00:00
|
|
|
fn from(err: PostError) -> Self { Error::Network(err) }
|
2019-03-03 22:02:38 +00:00
|
|
|
}
|