mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 02:36:24 -04:00
Little improvement in comment of the extension function.
This commit is contained in:
parent
6e5d487d38
commit
98f29b7757
@ -457,12 +457,12 @@ val String.addContentPrefix: String
|
||||
get() = if (startsWith(CONTENT_PREFIX)) this else CONTENT_PREFIX + this
|
||||
|
||||
/**
|
||||
* Handling the any error thrown by this method. Devs should handle the flow if this methods
|
||||
* returns null. See https://github.com/kiwix/kiwix-android/issues/4157 for more details.
|
||||
* Handles any error thrown by this method. Developers should handle the flow if this method
|
||||
* returns null. For more details, see: https://github.com/kiwix/kiwix-android/issues/4157
|
||||
*/
|
||||
fun Item.itemSize(): Long? = try {
|
||||
size
|
||||
} catch (ignore: Exception) {
|
||||
Log.e(TAG, "Could not get the item size.\n Original exception = $ignore")
|
||||
Log.e(TAG, "Could not retrieve the item size.\n Original exception: $ignore")
|
||||
null
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user