1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 06:16:04 +00:00

add IGNORE_ERRORS const

This commit is contained in:
mat 2022-05-01 14:14:51 -05:00
parent 0ccf203460
commit 1a68d55eaf

View file

@ -43,6 +43,8 @@ pub enum Event {
Login,
}
const IGNORE_ERRORS: bool = false;
impl Client {
async fn join(account: &Account, address: &ServerAddress) -> Result<Self, String> {
let resolved_address = resolver::resolve_address(address).await?;
@ -147,9 +149,13 @@ impl Client {
match r {
Ok(packet) => Self::handle(&packet, &tx, &state, &conn).await,
Err(e) => {
println!("Error: {:?}", e);
if e == "length wider than 21-bit" {
panic!();
if IGNORE_ERRORS {
println!("Error: {:?}", e);
if e == "length wider than 21-bit" {
panic!();
}
} else {
panic!("Error: {:?}", e);
}
}
};