1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-22 16:47:13 +00:00

fix not implemented error thrown

This commit is contained in:
InsanusMokrassar 2020-04-22 13:05:57 +06:00
parent 94f8c971c5
commit 3f896c2240
2 changed files with 14 additions and 6 deletions

View File

@ -40,6 +40,10 @@
### 0.26.4
* `TelegramBotAPI`:
* Now any getting of updates will return `UnknownUpdateType` when inside of deserialization will be
`SerializationException` or `NotImplemented` error
### 0.26.3
* `TelegramBotAPI`:

View File

@ -64,12 +64,16 @@ internal data class RawUpdate constructor(
raw
)
}
} catch (e: SerializationException) {
UnknownUpdateType(
updateId,
raw.toString(),
raw
)
} catch (e: Error) {
when (e) {
is SerializationException,
is NotImplementedError -> UnknownUpdateType(
updateId,
raw.toString(),
raw
)
else -> throw e
}
}.also {
initedUpdate = it
}