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 --- azalea-buf/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'azalea-buf/src/lib.rs') diff --git a/azalea-buf/src/lib.rs b/azalea-buf/src/lib.rs index 5bde833c..7860325e 100644 --- a/azalea-buf/src/lib.rs +++ b/azalea-buf/src/lib.rs @@ -9,7 +9,7 @@ mod write; pub use buf_macros::*; pub use definitions::*; -pub use read::{read_varint_async, McBufReadable, McBufVarReadable, Readable}; +pub use read::{read_varint_async, BufReadError, McBufReadable, McBufVarReadable, Readable}; pub use serializable_uuid::*; pub use write::{McBufVarWritable, McBufWritable, Writable}; -- cgit v1.2.3