Add clarification about event consumer exception handling
Signed-off-by: Nicolas NESMON (NicoNes) <nicolas.nesmon@gmail.com>
diff --git a/jaxrs-api/src/main/java/jakarta/ws/rs/sse/SseEventSource.java b/jaxrs-api/src/main/java/jakarta/ws/rs/sse/SseEventSource.java
index bc5f06d..a77d6df 100644
--- a/jaxrs-api/src/main/java/jakarta/ws/rs/sse/SseEventSource.java
+++ b/jaxrs-api/src/main/java/jakarta/ws/rs/sse/SseEventSource.java
@@ -72,6 +72,11 @@
* <p>
* In the case of an error condition response, the <code>Throwable</code> passed to the <code>onError</code> consumer
* <i>should</i> be a WebApplicationException containing the invalid <code>Response</code> object.
+ * <p>
+ * Note that if, for any of the registered event consumers, invocation of {@link Consumer#accept(Object)
+ * Consumer<InboundSseEvent>#accept(InboundSseEvent)} method throws an exception, this is not an error condition.
+ * Thus <code>onError</code> is not invoked and event processing is not stopped.
+ * User is encouraged to handle exception himself in the event consumer code.
*
* @author Marek Potociar
* @since 2.1