pdvrieze / xmlutil

XML Serialization library for Kotlin
https://pdvrieze.github.io/xmlutil/
Apache License 2.0
374 stars 30 forks source link

Exceptions thrown should be SerializationException #228

Open florianmutter opened 1 month ago

florianmutter commented 1 month ago

To make it easier to handle issues when serialization or de-serialization xmlutil should throw exceptions that inherits from kotlinx.serialization.SerializationException

pdvrieze commented 1 month ago

I can have a look at that for exceptions in the serializer code/module itself (I believe those are already inheriting SerializationException), but parsing is an independent module that throws its own exceptions. There can also be exceptions thrown by the (de)serialized classes. A separate issue is compatibility with existing code, and adding a superclass would be a potentially breaking change.