From 9012fe45197461ea13eb3fe734be864161f85207 Mon Sep 17 00:00:00 2001 From: Michael Christen Date: Mon, 23 Jan 2023 09:08:25 +0100 Subject: [PATCH] extended error message --- source/net/yacy/cora/protocol/http/HTTPClient.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/net/yacy/cora/protocol/http/HTTPClient.java b/source/net/yacy/cora/protocol/http/HTTPClient.java index d9e74baa9..45e206b6d 100644 --- a/source/net/yacy/cora/protocol/http/HTTPClient.java +++ b/source/net/yacy/cora/protocol/http/HTTPClient.java @@ -902,10 +902,14 @@ public class HTTPClient implements Closeable { } this.httpResponse.setHeader(HeaderFramework.RESPONSE_TIME_MILLIS, Long.toString(System.currentTimeMillis() - time)); } catch (final Throwable e) { + long runtime = System.currentTimeMillis() - time; close(); throw new IOException("Client can't execute: " + (e.getCause() == null ? e.getMessage() : e.getCause().getMessage()) - + " duration=" + Long.toString(System.currentTimeMillis() - time) + " for url " + uri); + + ", timeout=" + this.timeout + + ", duration=" + Long.toString(runtime) + + ", concurrent=" + Boolean.toString(concurrent) + + ", url=" + uri); } finally { /* Restore the thread initial name */ Thread.currentThread().setName(initialThreadName);