Skip to content

Commit f7e7593

Browse files
committed
Merge code
1 parent 856c1c5 commit f7e7593

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/src/main/java/com/fankes/coloros/notify/utils/factory/ExceptionFactory.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,6 @@ inline fun <T> safeOf(default: T, result: () -> T) = try {
7878
* @param msg 出错输出的消息 - 默认为空
7979
* @param block 正常回调
8080
*/
81-
inline fun runSafe(msg: String = "", block: () -> Unit) {
81+
inline fun <T> T.runSafe(msg: String = "", block: () -> Unit) {
8282
runCatching(block).onFailure { if (msg.isNotBlank()) loggerE(msg = msg, e = it) }
8383
}

0 commit comments

Comments
 (0)