Skip to content

Commit

Permalink
change logging behaviour to comply with the Code standard
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksandr Krutko <[email protected]>
  • Loading branch information
arsenalzp committed Sep 19, 2024
1 parent 3117b5c commit bc0afd2
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ public PathResponseListener(Path path) throws FileNotFoundException, IOException
{
if (LOG.isDebugEnabled())
LOG.debug("Unable to instantiate object", e);

throw e;
else
throw e;
}
}

Expand All @@ -108,8 +108,8 @@ public void onContent(Response response, ByteBuffer content) throws IOException
{
if (LOG.isDebugEnabled())
LOG.debug("Unable to write file", e);

throw e;
else
throw e;
}
}

Expand Down Expand Up @@ -178,8 +178,10 @@ public static CompletableFuture<Path> write(Request request, Path path)
fileStream.write(contentStream.readAllBytes());
}
else
{
throw new HttpResponseException(Integer.toString(response.getStatus()), response);
{ if (LOG.isDebugEnabled())
LOG.debug("Unable to proceed with request");
else
throw new HttpResponseException(Integer.toString(response.getStatus()), response);
}
}
catch (InterruptedException | TimeoutException | ExecutionException | IOException | HttpResponseException e)
Expand Down

0 comments on commit bc0afd2

Please sign in to comment.