From f55c012d147c8d0a1f0dd886f5cad6061a383bbb Mon Sep 17 00:00:00 2001 From: Innokenty Shuvalov Date: Sun, 22 Mar 2015 01:51:07 +0300 Subject: [PATCH] add logging of a caught exception in TestSession log exception that can occur while sending delete session request Signed-off-by: Daniel Davison --- .../src/org/openqa/grid/internal/TestSession.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/java/server/src/org/openqa/grid/internal/TestSession.java b/java/server/src/org/openqa/grid/internal/TestSession.java index bec226e4169da..1c8a31eaabab4 100644 --- a/java/server/src/org/openqa/grid/internal/TestSession.java +++ b/java/server/src/org/openqa/grid/internal/TestSession.java @@ -561,13 +561,13 @@ public boolean sendDeleteSessionRequest() { } catch (Throwable e) { ok = false; // corrupted or the something else already sent the DELETE. - log.severe("Error releasing. Server corrupted ?"); - }finally{ - try { - EntityUtils.consume(responseBody); - } catch (IOException e) { - log.warning("Consuming the response body when DELETE to the node" + e.getMessage()); - } + log.severe("Unable to send DELETE request for the current session", e); + } finally { + try { + EntityUtils.consume(responseBody); + } catch (IOException e) { + log.warning("Consuming the response body when DELETE to the node " + e.getMessage()); + } } return ok; }