mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-25 03:28:44 +00:00
fixes in build + changes in signature of executeUnsafe
This commit is contained in:
parent
dc0fda2066
commit
1874023c05
@ -50,6 +50,8 @@
|
|||||||
* `UUID`: `0.2.1` -> `0.2.2`
|
* `UUID`: `0.2.1` -> `0.2.2`
|
||||||
* `TelegramBotAPI-core`:
|
* `TelegramBotAPI-core`:
|
||||||
* `ExceptionHandler` has changed its incoming type: `Exception` -> `Throwable`
|
* `ExceptionHandler` has changed its incoming type: `Exception` -> `Throwable`
|
||||||
|
* `handleSafely` has changed its signature
|
||||||
|
* `executeUnsafe` has changed its signature
|
||||||
|
|
||||||
## 0.27.0
|
## 0.27.0
|
||||||
|
|
||||||
|
@ -24,10 +24,10 @@ suspend fun <T: Any> RequestsExecutor.executeUnsafe(
|
|||||||
request: Request<T>,
|
request: Request<T>,
|
||||||
retries: Int = 0,
|
retries: Int = 0,
|
||||||
retriesDelay: Long = 1000L,
|
retriesDelay: Long = 1000L,
|
||||||
onAllFailed: (suspend (exceptions: Array<Exception>) -> Unit)? = null
|
onAllFailed: (suspend (exceptions: Array<Throwable>) -> Unit)? = null
|
||||||
): T? {
|
): T? {
|
||||||
var leftRetries = retries
|
var leftRetries = retries
|
||||||
val exceptions = onAllFailed ?.let { mutableListOf<Exception>() }
|
val exceptions = onAllFailed ?.let { mutableListOf<Throwable>() }
|
||||||
do {
|
do {
|
||||||
return handleSafely(
|
return handleSafely(
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user