veloren/client/src/error.rs

26 lines
556 B
Rust
Raw Normal View History

use authc::AuthClientError;
use common::net::PostError;
#[derive(Debug)]
pub enum Error {
Network(PostError),
ServerWentMad,
ServerTimeout,
ServerShutdown,
2019-07-01 11:19:26 +00:00
TooManyPlayers,
2019-12-21 17:02:39 +00:00
AlreadyLoggedIn,
AuthErr(String),
AuthClientError(AuthClientError),
AuthServerNotTrusted,
//TODO: InvalidAlias,
Other(String),
}
impl From<PostError> for Error {
fn from(err: PostError) -> Self { Self::Network(err) }
}
impl From<AuthClientError> for Error {
fn from(err: AuthClientError) -> Self { Self::AuthClientError(err) }
}