You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
556 B
22 lines
556 B
//
|
|
// catchErrorJustComplete.swift
|
|
// RxSwiftExt
|
|
//
|
|
// Created by Florent Pillet on 21/05/16.
|
|
// Copyright © 2016 RxSwift Community. All rights reserved.
|
|
//
|
|
|
|
import RxSwift
|
|
|
|
extension ObservableType {
|
|
/**
|
|
Dismiss errors and complete the sequence instead
|
|
|
|
- returns: An observable sequence that never errors and completes when an error occurs in the underlying sequence
|
|
*/
|
|
public func catchErrorJustComplete() -> Observable<Element> {
|
|
return catchError { _ in
|
|
return Observable.empty()
|
|
}
|
|
}
|
|
}
|