You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception in thread "main" java.lang.IllegalStateException: Unexpected EOF
at kotlinx.serialization.protobuf.ProtoBuf$Varint.decodeVarint$kotlinx_serialization_protobuf(ProtoBuf.kt:485)
at kotlinx.serialization.protobuf.ProtoBuf$ProtobufDecoder.decode32(ProtoBuf.kt:421)
at kotlinx.serialization.protobuf.ProtoBuf$ProtobufDecoder.decode32$default(ProtoBuf.kt:420)
at kotlinx.serialization.protobuf.ProtoBuf$ProtobufDecoder.nextInt(ProtoBuf.kt:370)
at kotlinx.serialization.protobuf.ProtoBuf$ProtobufReader.decodeTaggedInt(ProtoBuf.kt:271)
at kotlinx.serialization.protobuf.ProtoBuf$ProtobufReader.decodeTaggedInt(ProtoBuf.kt:236)
at kotlinx.serialization.internal.TaggedDecoder.decodeIntElement(Tagged.kt:222)
at MyMessage$$serializer.deserialize(protobug.kt)
at MyMessage$$serializer.deserialize(protobug.kt:5)
at kotlinx.serialization.protobuf.ProtoBuf$ProtobufReader.decodeSerializableValue(ProtoBuf.kt:290)
at kotlinx.serialization.DecodingKt.decode(Decoding.kt:521)
at kotlinx.serialization.protobuf.ProtoBuf.load(ProtoBuf.kt:548)
at kotlinx.serialization.protobuf.ProtoBuf$Default.load(ProtoBuf.kt)
at ProtobugKt.main(protobug.kt:13)
at ProtobugKt.main(protobug.kt)
This crashes my application because I use protobuf to serialize data to disc and catch SerializationException on parsing.
The correct behavior would be to wrap the IllegalStateException in a SerializationException.
The text was updated successfully, but these errors were encountered:
Using Kotlin 1.3.72 and serialization 0.20.0, the following code throws an exception:
This crashes my application because I use protobuf to serialize data to disc and catch
SerializationException
on parsing.The correct behavior would be to wrap the
IllegalStateException
in aSerializationException
.The text was updated successfully, but these errors were encountered: