Replace failWith with error in examples
This commit is contained in:
parent
5c1adf29df
commit
5b7dff230f
|
|
@ -1099,12 +1099,12 @@ NSURLSession.sharedSession().rx_response(myNSURLRequest)
|
|||
return just(transform(data))
|
||||
}
|
||||
else {
|
||||
return failWith(yourNSError)
|
||||
return Observable.error(yourNSError)
|
||||
}
|
||||
}
|
||||
else {
|
||||
rxFatalError("response = nil")
|
||||
return failWith(yourNSError)
|
||||
return Observable.error(yourNSError)
|
||||
}
|
||||
}
|
||||
.subscribe { event in
|
||||
|
|
|
|||
|
|
@ -139,11 +139,11 @@ example("generate") {
|
|||
}
|
||||
|
||||
/*:
|
||||
### failWith
|
||||
### error
|
||||
create an Observable that emits no items and terminates with an error
|
||||
*/
|
||||
|
||||
example("failWith") {
|
||||
example("error") {
|
||||
let error = NSError(domain: "Test", code: -1, userInfo: nil)
|
||||
|
||||
let erroredSequence = Observable<Int>.error(error)
|
||||
|
|
|
|||
Loading…
Reference in New Issue