File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
language-adaptors/rxjava-scala/src/main/scala/rx/lang/scala Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -3811,6 +3811,21 @@ object Observable {
3811
3811
toScalaObservable[T ](rx.Observable .error(exception))
3812
3812
}
3813
3813
3814
+ /**
3815
+ * Returns an Observable that invokes an `Observer`'s `onError` method on the
3816
+ * specified Scheduler.
3817
+ *
3818
+ * <img width="640" height="190" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/error.s.png">
3819
+ *
3820
+ * @param exception the particular Throwable to pass to `onError`
3821
+ * @param scheduler the Scheduler on which to call `onError`
3822
+ * @tparam T the type of the items (ostensibly) emitted by the Observable
3823
+ * @return an Observable that invokes the `Observer`'s `onError` method, on the specified Scheduler
3824
+ */
3825
+ def error [T ](exception : Throwable , scheduler : Scheduler ): Observable [T ] = {
3826
+ toScalaObservable[T ](rx.Observable .error(exception, scheduler))
3827
+ }
3828
+
3814
3829
/**
3815
3830
* Returns an Observable that emits no data to the [[rx.lang.scala.Observer ]] and
3816
3831
* immediately invokes its [[rx.lang.scala.Observer#onCompleted onCompleted ]] method
You can’t perform that action at this time.
0 commit comments