add SQLiteBlobTooBigException catch for safeMoveToPosition
This commit is contained in:
parent
afac44ca43
commit
17397628fc
|
@ -1,6 +1,7 @@
|
|||
package org.mariotaku.ktextension
|
||||
|
||||
import android.database.Cursor
|
||||
import android.database.sqlite.SQLiteBlobTooBigException
|
||||
import org.mariotaku.library.objectcursor.ObjectCursor
|
||||
import java.util.*
|
||||
|
||||
|
@ -12,6 +13,8 @@ fun Cursor.safeMoveToPosition(pos: Int) = try {
|
|||
moveToPosition(pos)
|
||||
} catch (e: IllegalStateException) {
|
||||
false
|
||||
} catch (e: SQLiteBlobTooBigException) {
|
||||
false
|
||||
}
|
||||
|
||||
fun Cursor.safeGetLong(columnIndex: Int, def: Long = -1) = try {
|
||||
|
|
Loading…
Reference in New Issue