I'm using RxJava 1.2.5. Consider this code:
UnicastSubject<String> s = UnicastSubject.create();
s.onNext("1");
s.onNext("2");
s.onError(new Exception("uh oh"));
s.subscribe(System.out::println, System.out::println);
This outputs:
java.lang.Exception: uh oh
However, the same code using RxJava 2.0.7 version of UnicastSubject outputs:
1
2
java.lang.Exception: uh oh
Which is the behavior I expected from 1.x.