First mapping of room. Still very dirty
This commit is contained in:
parent
58decf03d8
commit
f906158f2b
11 changed files with 165 additions and 30 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue