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
When I try to serialize an object that has a not null string property in avro schema but I set is as null in code I'm getting System.ArgumentNullException: String reference not set to an instance of a String. (Parameter 's')
at System.Text.Encoding.GetBytes(String s)
at Transaction serializer(Closure , TransactionAvro )
at Chr.Avro.Serialization.BinarySerializer`1.Serialize(T value)
Not clear at what property it failed, it will be better to have an exception like Serialization failed, expected property {nameOfTheProperty} to be not null but was null. Or exepected property type to be string but was int, etc.
The text was updated successfully, but these errors were encountered:
sergiutugulschi
changed the title
Output what property failed to serialize according to the schema
Output more friendly exception messages in case of serialization failure, like what property failed to serialize according to the schema
Nov 27, 2020
This situation is somewhat improved at serde build time with 39fa633, but improving runtime exceptions like the one shown above will need some additional investigation to implement without impacting performance.
When I try to serialize an object that has a not null string property in avro schema but I set is as null in code I'm getting System.ArgumentNullException: String reference not set to an instance of a String. (Parameter 's')
at System.Text.Encoding.GetBytes(String s)
at Transaction serializer(Closure , TransactionAvro )
at Chr.Avro.Serialization.BinarySerializer`1.Serialize(T value)
Not clear at what property it failed, it will be better to have an exception like Serialization failed, expected property {nameOfTheProperty} to be not null but was null. Or exepected property type to be string but was int, etc.
The text was updated successfully, but these errors were encountered: