From 9b84b672eb5463fbb71bf36feecfc1770ca9fa54 Mon Sep 17 00:00:00 2001 From: 0xb00bface <0xboobface@gmail.com> Date: Sun, 12 Dec 2021 13:50:10 +0100 Subject: [PATCH] Throw InterruptedIOException instead of wrapping the InterruptedException in an IOException --- .../java/ctbrec/sites/chaturbate/ChaturbateHttpClient.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/ctbrec/sites/chaturbate/ChaturbateHttpClient.java b/common/src/main/java/ctbrec/sites/chaturbate/ChaturbateHttpClient.java index 678f7fc6..6cefaffa 100644 --- a/common/src/main/java/ctbrec/sites/chaturbate/ChaturbateHttpClient.java +++ b/common/src/main/java/ctbrec/sites/chaturbate/ChaturbateHttpClient.java @@ -3,6 +3,7 @@ package ctbrec.sites.chaturbate; import static ctbrec.io.HttpConstants.*; import java.io.IOException; +import java.io.InterruptedIOException; import java.util.NoSuchElementException; import java.util.Objects; import java.util.concurrent.Semaphore; @@ -143,7 +144,7 @@ public class ChaturbateHttpClient extends HttpClient { return resp; } catch (InterruptedException e) { Thread.currentThread().interrupt(); - throw new IOException("Interrupted during request", e); + throw new InterruptedIOException("Interrupted during request"); } finally { if (throttle) { releaseSlot();