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) {
1972
1972
throw ex ;
1973
1973
} catch (Throwable ex ) {
1974
1974
ERROR_HANDLER .handleError (ex );
1975
+ Exceptions .throwIfFatal (ex );
1975
1976
throw toNpe (ex );
1976
1977
}
1977
1978
}
Original file line number Diff line number Diff line change @@ -2813,6 +2813,30 @@ public void call() {
2813
2813
});
2814
2814
}
2815
2815
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
+
2816
2840
@ Test (timeout = 1000 )
2817
2841
public void timeoutEmitError () {
2818
2842
Throwable e = Completable .never ().timeout (100 , TimeUnit .MILLISECONDS ).get ();
You can’t perform that action at this time.
0 commit comments