File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -1972,6 +1972,7 @@ public final void subscribe(CompletableSubscriber s) {
19721972 throw ex ;
19731973 } catch (Throwable ex ) {
19741974 ERROR_HANDLER .handleError (ex );
1975+ Exceptions .throwIfFatal (ex );
19751976 throw toNpe (ex );
19761977 }
19771978 }
Original file line number Diff line number Diff line change @@ -2813,6 +2813,30 @@ public void call() {
28132813 });
28142814 }
28152815
2816+ @ Test (expected = OnErrorNotImplementedException .class )
2817+ public void propagateExceptionSubscribeEmpty () {
2818+ error .completable .toSingleDefault (0 ).subscribe ();
2819+ }
2820+
2821+ @ Test (expected = OnErrorNotImplementedException .class )
2822+ public void propagateExceptionSubscribeOneAction () {
2823+ error .completable .toSingleDefault (1 ).subscribe (new Action1 <Integer >() {
2824+ @ Override
2825+ public void call (Integer integer ) {
2826+ }
2827+ });
2828+ }
2829+
2830+ @ Test (expected = OnErrorNotImplementedException .class )
2831+ public void propagateExceptionSubscribeOneActionThrowFromOnSuccess () {
2832+ normal .completable .toSingleDefault (1 ).subscribe (new Action1 <Integer >() {
2833+ @ Override
2834+ public void call (Integer integer ) {
2835+ throw new TestException ();
2836+ }
2837+ });
2838+ }
2839+
28162840 @ Test (timeout = 1000 )
28172841 public void timeoutEmitError () {
28182842 Throwable e = Completable .never ().timeout (100 , TimeUnit .MILLISECONDS ).get ();
You can’t perform that action at this time.
0 commit comments