Skip to content

Commit d8a07aa

Browse files
committed
Merge pull request reactive-streams#243 from reactive-streams/wip-234-cnp-errors-√
Addresses a couple of typos in the examples for AsyncSubscriber and Sync...
2 parents d8a6c24 + d9c1568 commit d8a07aa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/src/main/java/org/reactivestreams/example/unicast/AsyncSubscriber.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ private final void handleOnSubscribe(final Subscription s) {
9494
s.request(1); // Our Subscriber is unbuffered and modest, it requests one element at a time
9595
} catch(final Throwable t) {
9696
// Subscription.request is not allowed to throw according to rule 3.16
97-
(new IllegalStateException(s + " violated the Reactive Streams rule 3.16 by throwing an exception from cancel.", t)).printStackTrace(System.err);
97+
(new IllegalStateException(s + " violated the Reactive Streams rule 3.16 by throwing an exception from request.", t)).printStackTrace(System.err);
9898
}
9999
}
100100
}
@@ -111,7 +111,7 @@ private final void handleOnNext(final T element) {
111111
subscription.request(1); // Our Subscriber is unbuffered and modest, it requests one element at a time
112112
} catch(final Throwable t) {
113113
// Subscription.request is not allowed to throw according to rule 3.16
114-
(new IllegalStateException(subscription + " violated the Reactive Streams rule 3.16 by throwing an exception from cancel.", t)).printStackTrace(System.err);
114+
(new IllegalStateException(subscription + " violated the Reactive Streams rule 3.16 by throwing an exception from request.", t)).printStackTrace(System.err);
115115
}
116116
} else {
117117
done(); // This is legal according to rule 2.6

examples/src/main/java/org/reactivestreams/example/unicast/SyncSubscriber.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public abstract class SyncSubscriber<T> implements Subscriber<T> {
3535
s.request(1); // Our Subscriber is unbuffered and modest, it requests one element at a time
3636
} catch(final Throwable t) {
3737
// Subscription.request is not allowed to throw according to rule 3.16
38-
(new IllegalStateException(s + " violated the Reactive Streams rule 3.16 by throwing an exception from cancel.", t)).printStackTrace(System.err);
38+
(new IllegalStateException(s + " violated the Reactive Streams rule 3.16 by throwing an exception from request.", t)).printStackTrace(System.err);
3939
}
4040
}
4141
}
@@ -54,7 +54,7 @@ public abstract class SyncSubscriber<T> implements Subscriber<T> {
5454
subscription.request(1); // Our Subscriber is unbuffered and modest, it requests one element at a time
5555
} catch (final Throwable t) {
5656
// Subscription.request is not allowed to throw according to rule 3.16
57-
(new IllegalStateException(subscription + " violated the Reactive Streams rule 3.16 by throwing an exception from cancel.", t)).printStackTrace(System.err);
57+
(new IllegalStateException(subscription + " violated the Reactive Streams rule 3.16 by throwing an exception from request.", t)).printStackTrace(System.err);
5858
}
5959
} else {
6060
done();

0 commit comments

Comments
 (0)