Replace failWith with error in examples

This commit is contained in:
shingt 2016-04-06 09:48:30 +09:00
parent 5c1adf29df
commit 5b7dff230f
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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)