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
553 B

2 years ago
  1. //
  2. // catchErrorJustComplete.swift
  3. // RxSwiftExt
  4. //
  5. // Created by Florent Pillet on 21/05/16.
  6. // Copyright © 2016 RxSwift Community. All rights reserved.
  7. //
  8. import RxSwift
  9. extension ObservableType {
  10. /**
  11. Dismiss errors and complete the sequence instead
  12. - returns: An observable sequence that never errors and completes when an error occurs in the underlying sequence
  13. */
  14. public func catchErrorJustComplete() -> Observable<Element> {
  15. return `catch` { _ in
  16. return Observable.empty()
  17. }
  18. }
  19. }