반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- nestjs
- Xcode
- IOS
- swift6
- graphql
- RFC1738/1808
- RxSwift
- Operater
- init
- typeorm
- nonisolated
- ios14
- Creating Operators
- @EnvironmentObject
- vim
- URL(string:)
- RxCocoa
- init?
- @State
- Operators
- subject
- dismiss
- SwiftUI
- Bug
- NavigationLink
- @Environment
- @Binding
- SWIFT
- operator
- NullObject
Archives
- Today
- Total
목록Catch (1)
Tunko Development Diary

catch, catchAndReturn 두 연산자 catch와 catchAndReturn 은 옵버버블에서 에러가 발생했을때에 대한 처리입니다. catch는 Error가 발생하면 새로운 옵저버블을 리턴해줍니다. catchAndReturn은 Error가 발생하면 특정 값을 Next이벤트로 전달합니다. let disposeBag = DisposeBag() enum TunkoError: Error { case error } let subject = PublishSubject() let errorSubject = PublishSubject() subject .catch { _ in errorSubject } .subscribe { print($0) } .disposed(by: disposeBag) subject...
Development/RxSwift
2022. 6. 10. 03:33