1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-06-03 00:15:27 +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 ### 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 ### 0.26.3
* `TelegramBotAPI`: * `TelegramBotAPI`:

View File

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