File tree Expand file tree Collapse file tree 8 files changed +5
-12
lines changed
common/src/main/kotlin/com/ninecraft/booket/core/common
datastore/impl/src/main/kotlin/com/ninecraft/booket/core/datastore/impl/datasource
network/src/main/kotlin/com/ninecraft/booket/core/network
feature/detail/src/main/kotlin/com/ninecraft/booket/feature/detail/book Expand file tree Collapse file tree 8 files changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ import androidx.core.content.FileProvider
1616import com.orhanobut.logger.Logger
1717import java.io.File
1818
19- @Suppress(" TooGenericExceptionCaught" )
2019fun Context.externalShareForBitmap (bitmap : ImageBitmap ) {
2120 try {
2221 val file = File (bitmap.saveToDisk(this ))
@@ -31,7 +30,6 @@ fun Context.externalShareForBitmap(bitmap: ImageBitmap) {
3130 }
3231}
3332
34- @Suppress(" TooGenericExceptionCaught" )
3533fun Context.saveImageToGallery (bitmap : ImageBitmap ) {
3634 try {
3735 val fileName = " reed_record_${System .currentTimeMillis()} .png"
Original file line number Diff line number Diff line change @@ -93,7 +93,6 @@ fun postErrorDialog(
9393 ErrorEventHelper .sendError(event = ErrorEvent .ShowDialog (spec))
9494}
9595
96- @Suppress(" TooGenericExceptionCaught" )
9796private fun HttpException.parseErrorMessage (): String? {
9897 return try {
9998 val errorBody = response()?.errorBody()?.string()
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import kotlin.contracts.ExperimentalContracts
1414 */
1515
1616@OptIn(ExperimentalContracts ::class )
17- @Suppress(" WRONG_INVOCATION_KIND" , " TooGenericExceptionCaught " )
17+ @Suppress(" WRONG_INVOCATION_KIND" )
1818inline fun <T > runSuspendCatching (block : () -> T ): Result <T > {
1919 // 계약(contract): 컴파일러에게 'block' 람다의 실행 시점과 횟수를 명시적으로 알림
2020 // 'callsInPlace'와 'EXACTLY_ONCE'는 'block'이 이 함수 내에서 즉시, 그리고 정확히 한 번만 실행됨을 보장
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ import javax.inject.Inject
1717class DefaultBookRecentSearchDataSource @Inject constructor(
1818 @BookRecentSearchDataStore private val dataStore : DataStore <Preferences >,
1919) : BookRecentSearchDataSource {
20- @Suppress(" TooGenericExceptionCaught" )
2120 override val recentSearches: Flow <List <String >> = dataStore.data
2221 .handleIOException()
2322 .map { prefs ->
@@ -34,7 +33,6 @@ class DefaultBookRecentSearchDataSource @Inject constructor(
3433 } ? : emptyList()
3534 }
3635
37- @Suppress(" TooGenericExceptionCaught" )
3836 override suspend fun addRecentSearch (query : String ) {
3937 if (query.isBlank()) return
4038
@@ -66,7 +64,6 @@ class DefaultBookRecentSearchDataSource @Inject constructor(
6664 }
6765 }
6866
69- @Suppress(" TooGenericExceptionCaught" )
7067 override suspend fun deleteRecentSearch (query : String ) {
7168 dataStore.edit { prefs ->
7269 val currentSearches = prefs[BOOK_RECENT_SEARCHES ]?.let { jsonString ->
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ import javax.inject.Inject
1717class DefaultLibraryRecentSearchDataSource @Inject constructor(
1818 @LibraryRecentSearchDataStore private val dataStore : DataStore <Preferences >,
1919) : LibraryRecentSearchDataSource {
20- @Suppress(" TooGenericExceptionCaught" )
2120 override val recentSearches: Flow <List <String >> = dataStore.data
2221 .handleIOException()
2322 .map { prefs ->
@@ -34,7 +33,6 @@ class DefaultLibraryRecentSearchDataSource @Inject constructor(
3433 } ? : emptyList()
3534 }
3635
37- @Suppress(" TooGenericExceptionCaught" )
3836 override suspend fun addRecentSearch (query : String ) {
3937 if (query.isBlank()) return
4038
@@ -66,7 +64,6 @@ class DefaultLibraryRecentSearchDataSource @Inject constructor(
6664 }
6765 }
6866
69- @Suppress(" TooGenericExceptionCaught" )
7067 override suspend fun deleteRecentSearch (query : String ) {
7168 dataStore.edit { prefs ->
7269 val currentSearches = prefs[LIBRARY_RECENT_SEARCHES ]?.let { jsonString ->
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import okhttp3.Route
1212import javax.inject.Inject
1313import javax.inject.Provider
1414
15- @Suppress(" TooGenericExceptionCaught" )
1615class TokenAuthenticator @Inject constructor(
1716 private val tokenDataSource : TokenDataSource ,
1817 private val serviceProvider : Provider <ReedService >,
Original file line number Diff line number Diff line change @@ -68,6 +68,10 @@ style:
6868 MaxLineLength :
6969 active : false
7070
71+ exceptions :
72+ TooGenericExceptionCaught :
73+ active : false
74+
7175naming :
7276 TopLevelPropertyNaming :
7377 constantPattern : ' [A-Z][A-Za-z0-9_]*'
Original file line number Diff line number Diff line change @@ -87,7 +87,6 @@ class BookDetailPresenter @AssistedInject constructor(
8787 var isBookDeleteDialogVisible by rememberRetained { mutableStateOf(false ) }
8888 var sideEffect by rememberRetained { mutableStateOf<BookDetailSideEffect ?>(null ) }
8989
90- @Suppress(" TooGenericExceptionCaught" )
9190 fun initialLoad () {
9291 uiState = UiState .Loading
9392
You can’t perform that action at this time.
0 commit comments