First mapping of room. Still very dirty

This commit is contained in:
Benoit Marty 2022-10-12 15:38:11 +02:00
parent 58decf03d8
commit f906158f2b
11 changed files with 165 additions and 30 deletions

View file

@ -0,0 +1,14 @@
package io.element.android.x.core.data
import android.util.Log
inline fun <A> tryOrNull(message: String? = null, operation: () -> A): A? {
return try {
operation()
} catch (any: Throwable) {
if (message != null) {
Log.e("TAG", message, any)
}
null
}
}