diff --git a/Documentation/GettingStarted.md b/Documentation/GettingStarted.md index f1945684..91a913cc 100644 --- a/Documentation/GettingStarted.md +++ b/Documentation/GettingStarted.md @@ -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 diff --git a/Rx.playground/Pages/Introduction.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Introduction.xcplaygroundpage/Contents.swift index 04994d5a..19552a62 100644 --- a/Rx.playground/Pages/Introduction.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Introduction.xcplaygroundpage/Contents.swift @@ -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.error(error)