-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PC-000] suspendRunCatching 추가 #26
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
태규님 덕분에 좋은 정보를 많이 배워가네요 👍 멋지십니다 정말
@@ -31,8 +32,8 @@ class TermsRepositoryImpl @Inject constructor( | |||
localTermDataSource.clearAndInsertTerms(termsEntity) | |||
} | |||
|
|||
override suspend fun getTerms(): Result<List<Term>> = runCatching { | |||
override suspend fun getTerms(): Result<List<Term>> = suspendRunCatching { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저번 PR에서 제가 달았던 코멘트의 의미는 get보다 의미 범위가 조금 더 좁은 단어를 말하는 거였어요!ㅎㅎ 제가 요즘 여기저기서 스코프라는 단어를 쓸 일이 좀 있었는데, 아무 생각없이 스코프라는 단어를 썼던 것 같아요 허허... 다음 PR부턴 조금 더 명확한 표현을 쓰도록 할게요...!!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아하 괜찮습니다!!
좀 더 좁은 의미가 흠.. 네이밍이 생각이 ㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠ
localTermDataSource.getTerms() | ||
.map { it.toDomain() } | ||
.map(TermEntity::toDomain) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 👍
1. ⭐️ 변경된 내용
2. 🖼️ 스크린샷(선택)
3. 💡 알게된 부분
Github를 돌아다니다가 현우님이 아래와 같은 PR을 작성해주신 것을 확인했어요.
ku-ring/KU-Ring-Android#405
너무 흥미로워서 공유합니다!
레퍼런스
runCatching
that does not handle aCancellationException
but re-throws it instead. Kotlin/kotlinx.coroutines#1814