Skip to content

Commit a583b8b

Browse files
committed
Wrap IOException as an UncheckedIOException
1 parent e97a892 commit a583b8b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/graphql/servlet/internal/SubscriptionSender.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import javax.websocket.Session;
66
import java.io.IOException;
7+
import java.io.UncheckedIOException;
78

89
class SubscriptionSender {
910

@@ -17,7 +18,7 @@ void send(Session session, Object payload) {
1718
try {
1819
session.getBasicRemote().sendText(objectMapper.writeValueAsString(payload));
1920
} catch (IOException e) {
20-
throw new RuntimeException("Error sending subscription response", e);
21+
throw new UncheckedIOException("Error sending subscription response", e);
2122
}
2223
}
2324
}

0 commit comments

Comments
 (0)