@@ -17,7 +17,8 @@ interface LoopInterface
1717 * A single stream resource MUST NOT be added more than once.
1818 * Instead, either call [`removeReadStream()`](#removereadstream) first or
1919 * react to this event with a single listener and then dispatch from this
20- * listener.
20+ * listener. This method MAY throw an `Exception` if the given resource type
21+ * is not supported by this loop implementation.
2122 *
2223 * The listener callback function MUST be able to accept a single parameter,
2324 * the stream resource added by this method or you MAY use a function which
@@ -47,6 +48,7 @@ interface LoopInterface
4748 *
4849 * @param resource $stream The PHP stream resource to check.
4950 * @param callable $listener Invoked when the stream is ready.
51+ * @throws \Exception if the given resource type is not supported by this loop implementation
5052 * @see self::removeReadStream()
5153 */
5254 public function addReadStream ($ stream , $ listener );
@@ -64,7 +66,8 @@ public function addReadStream($stream, $listener);
6466 * A single stream resource MUST NOT be added more than once.
6567 * Instead, either call [`removeWriteStream()`](#removewritestream) first or
6668 * react to this event with a single listener and then dispatch from this
67- * listener.
69+ * listener. This method MAY throw an `Exception` if the given resource type
70+ * is not supported by this loop implementation.
6871 *
6972 * The listener callback function MUST be able to accept a single parameter,
7073 * the stream resource added by this method or you MAY use a function which
@@ -102,6 +105,7 @@ public function addReadStream($stream, $listener);
102105 *
103106 * @param resource $stream The PHP stream resource to check.
104107 * @param callable $listener Invoked when the stream is ready.
108+ * @throws \Exception if the given resource type is not supported by this loop implementation
105109 * @see self::removeWriteStream()
106110 */
107111 public function addWriteStream ($ stream , $ listener );
0 commit comments