From 5658fe514fe310eabab1f7966a8828d789b6b976 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janis=20K=C3=B6nig?= Date: Tue, 11 Jul 2023 15:19:27 +0200 Subject: [PATCH] Provide encapsulated Tls error information When `.to_string()` is invoked on a the crate-wide Error enum, the error message using #[error("...")] is displayed. Some of those wrapped internal enums also contain, possibly more helpful, error messages. This will include the string gathered by `.to_string()` from the encapsulated enum in the main error message. See also https://github.com/squidowl/halloy/pull/143 --- src/error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/error.rs b/src/error.rs index c33ab42..391340d 100644 --- a/src/error.rs +++ b/src/error.rs @@ -31,7 +31,7 @@ pub enum Error { /// An internal TLS error. #[cfg(all(feature = "tls-native", not(feature = "tls-rust")))] - #[error("a TLS error occurred")] + #[error("a TLS error occurred: {0}")] Tls( #[source] #[from]