RxJava 예외 처리 기본적으로 Observer의 onError 함수를 통해서 에러를 처리할 수 있습니다. onError로 에러를 처리하는 경우 스트림은 데이터 발행을 중단하며 Observer는 onComplete 호출을 하지 못합니다. fun onError() { Observable.create { emitter -> emitter.onNext("Message 1") emitter.onNext("Message 2") throw Exception("Something Wrong") }.subscribe({ println(it) }, { println("Error : $it") }) } Message 1 Message 2 Error : java.lang.Exception: Something Wrong Rx..
Android/RxJava
2022. 3. 8. 18:01
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 보이스카우트 규칙
- git
- ConcatAdapter
- DSL
- 클린코드
- Flutter
- viewmodel
- DART
- null
- Coroutine
- 함수
- 연산자
- Exception
- isActive
- Android
- ViewModelProvider
- clean code
- CancellationException
- 클린 코드
- 코루틴
- TDD
- Flowable
- ConcatAdapter.Config
- Widget
- ViewModelStoreOwner
- commit
- Kotlin
- observable
- rxjava
- gradle
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
글 보관함
