Fix wrong exception being caught after 8c480c6355 migration
`android.database.sqlite.SQLiteException` instead of `android.database.SQLException` # Conflicts: # CHANGELOG.md
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
package mihon.data.repository
|
package mihon.data.repository
|
||||||
|
|
||||||
import android.database.sqlite.SQLiteException
|
import android.database.SQLException
|
||||||
import kotlinx.coroutines.flow.Flow
|
import kotlinx.coroutines.flow.Flow
|
||||||
import kotlinx.coroutines.flow.map
|
import kotlinx.coroutines.flow.map
|
||||||
import mihon.domain.extensionrepo.exception.SaveExtensionRepoException
|
import mihon.domain.extensionrepo.exception.SaveExtensionRepoException
|
||||||
@@ -42,7 +42,7 @@ class ExtensionRepoRepositoryImpl(
|
|||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
handler.await { extension_reposQueries.insert(baseUrl, name, shortName, website, signingKeyFingerprint) }
|
handler.await { extension_reposQueries.insert(baseUrl, name, shortName, website, signingKeyFingerprint) }
|
||||||
} catch (ex: SQLiteException) {
|
} catch (ex: SQLException) {
|
||||||
throw SaveExtensionRepoException(ex)
|
throw SaveExtensionRepoException(ex)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -56,7 +56,7 @@ class ExtensionRepoRepositoryImpl(
|
|||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
handler.await { extension_reposQueries.upsert(baseUrl, name, shortName, website, signingKeyFingerprint) }
|
handler.await { extension_reposQueries.upsert(baseUrl, name, shortName, website, signingKeyFingerprint) }
|
||||||
} catch (ex: SQLiteException) {
|
} catch (ex: SQLException) {
|
||||||
throw SaveExtensionRepoException(ex)
|
throw SaveExtensionRepoException(ex)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user