From 5a9fca0ca9cdb46f4b866781f219756c89e2293a Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Sat, 6 Aug 2022 07:22:19 +0000 Subject: Better errors (#14) * make reading use thiserror * finish implementing all the error things * clippy warnings related to ok_or * fix some errors in other places * thiserror in more places * don't use closures in a couple places * errors in writing packet * rip backtraces * change some BufReadError::Custom to UnexpectedEnumVariant * Errors say what packet is bad * error on leftover data and fix it wasn't reading the properties for gameprofile --- Cargo.lock | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'Cargo.lock') diff --git a/Cargo.lock b/Cargo.lock index d38f8eaf..5f1bdb2e 100755 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,6 +19,12 @@ dependencies = [ "cpufeatures", ] +[[package]] +name = "anyhow" +version = "1.0.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c91f1f46651137be86f3a2b9a8359f9ab421d04d941c62b5982e1ca21113adf9" + [[package]] name = "async-compression" version = "0.3.14" @@ -75,6 +81,7 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" name = "azalea-auth" version = "0.1.0" dependencies = [ + "azalea-buf", "uuid", ] @@ -95,6 +102,8 @@ version = "0.1.0" dependencies = [ "buf-macros", "byteorder", + "serde_json", + "thiserror", "tokio", "uuid", ] @@ -114,12 +123,14 @@ dependencies = [ name = "azalea-client" version = "0.1.0" dependencies = [ + "anyhow", "azalea-auth", "azalea-core", "azalea-crypto", "azalea-entity", "azalea-protocol", "azalea-world", + "thiserror", "tokio", "uuid", ] @@ -218,6 +229,7 @@ dependencies = [ "azalea-nbt", "log", "nohash-hasher", + "thiserror", "uuid", ] @@ -1290,18 +1302,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.31" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" +checksum = "f5f6586b7f764adc0231f4c79be7b920e766bb2f3e51b3661cdb263828f19994" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.31" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" +checksum = "12bafc5b54507e0149cdf1b145a5d80ab80a90bcd9275df43d4fff68460f6c21" dependencies = [ "proc-macro2", "quote", -- cgit v1.2.3