Throw InterruptedIOException instead of wrapping the InterruptedException in an IOException

This commit is contained in:
0xb00bface 2021-12-12 13:50:10 +01:00
parent 8012c95d13
commit 9b84b672eb
1 changed files with 2 additions and 1 deletions

View File

@ -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();