From d6c15fa833a2bd32bcf026293b65000aac88cd9a Mon Sep 17 00:00:00 2001 From: Hocuri Date: Sun, 4 Oct 2020 17:23:58 +0200 Subject: [PATCH 1/2] Show more errors --- src/configure/mod.rs | 2 +- src/configure/read_url.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/configure/mod.rs b/src/configure/mod.rs index 2187d2f122..32e0a40f89 100644 --- a/src/configure/mod.rs +++ b/src/configure/mod.rs @@ -574,7 +574,7 @@ pub enum Error { #[error("Invalid email address: {0:?}")] InvalidEmailAddress(String), - #[error("XML error at position {position}")] + #[error("XML error at position {position}: {error}")] InvalidXml { position: usize, #[source] diff --git a/src/configure/read_url.rs b/src/configure/read_url.rs index 096b7b218e..dfd860c12e 100644 --- a/src/configure/read_url.rs +++ b/src/configure/read_url.rs @@ -12,7 +12,7 @@ pub async fn read_url(context: &Context, url: &str) -> Result { match surf::get(url).recv_string().await { Ok(res) => Ok(res), Err(err) => { - info!(context, "Can\'t read URL {}", url); + info!(context, "Can\'t read URL {}: {}", url, err); Err(Error::GetError(err)) } From bee9d2375a2199797acaa28db2a0bc16678d1a43 Mon Sep 17 00:00:00 2001 From: Hocuri Date: Sun, 4 Oct 2020 17:33:18 +0200 Subject: [PATCH 2/2] Show another error, just in case --- src/configure/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configure/mod.rs b/src/configure/mod.rs index 32e0a40f89..dafa6c565b 100644 --- a/src/configure/mod.rs +++ b/src/configure/mod.rs @@ -581,7 +581,7 @@ pub enum Error { error: quick_xml::Error, }, - #[error("Failed to get URL")] + #[error("Failed to get URL: {0}")] ReadUrlError(#[from] self::read_url::Error), #[error("Number of redirection is exceeded")]