catch serialization

This commit is contained in:
Milos Kozak 2022-07-10 20:48:19 +02:00
parent 9b6477381b
commit e1423c0f82

View file

@ -14,7 +14,11 @@ sealed class EventData : Event() {
companion object { companion object {
fun deserialize(json: String) = Json.decodeFromString(serializer(), json) fun deserialize(json: String) = try {
Json.decodeFromString(serializer(), json)
} catch (ignored: Exception) {
Error(System.currentTimeMillis())
}
} }
// Mobile <- Wear // Mobile <- Wear