All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.github.insanusmokrassar.TelegramBotAPI.extensions.utils.SafelyShortcut.kt Maven / Gradle / Ivy

The newest version!
package com.github.insanusmokrassar.TelegramBotAPI.extensions.utils

import com.github.insanusmokrassar.TelegramBotAPI.utils.*
import kotlinx.coroutines.CoroutineScope

/**
 * Shortcut for [handleSafely]. It was created for more comfortable way of handling different things
 */
@PreviewFeature
suspend inline fun  safely(
    noinline onException: ExceptionHandler = { throw it },
    noinline block: suspend CoroutineScope.() -> T
): T = handleSafely(
    onException,
    block
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy