Hi Stanislav, Thanks for the KIP.
As as user, "FaultyRecordException" seems a little vague. What's faulty about it? Is it too big? Does it not match the schema of the other records? Was it not found? Of course, we know that the specific problem is with [de]serializing the record, not with any of those those things. So we should choose a name that reflects that serialization is the problem. How about RecordSerializationException? best, Colin On Thu, Aug 2, 2018, at 15:11, Stanislav Kozlovski wrote: > Hi Jason and Ted, > > @Jason > I did not oppose the idea as I'm not too familiar with Java conventions. I > agree it is a non-ideal way for the user to catch the exception so I > changed it back. > > I've updated the KIP and PR with the latest changes. Now, there is only one > public exception `FaultyRecordException` which is thrown to the user in > both scenarios (corrupt record and deserialization error). > Please take a look again. > > Best, > Stanislav > > On Thu, Aug 2, 2018 at 5:25 PM Jason Gustafson <ja...@confluent.io> wrote: > > > Hey Stanislav, > > > > I should have noticed it earlier from your example, but I just realized > > that interfaces don't mix well with exceptions. There is no way to catch > > the interface type, which means you have to depend on instanceof checks, > > which is not very conventional. At the moment, we raise > > SerializationException if there is a problem parsing the error, and we > > raise KafkaException if the record fails its CRC check. Since > > SerializationException extends KafkaExeption, it seems like we can handle > > both cases in a compatible way by handling both cases with a single type > > that extends SerializationException. Maybe something like > > RecordDeserializationException? > > > > Thanks, > > Jason > > > > On Thu, Aug 2, 2018 at 5:45 AM, Ted Yu <yuzhih...@gmail.com> wrote: > > > > > +1 > > > -------- Original message --------From: Stanislav Kozlovski < > > > stanis...@confluent.io> Date: 8/2/18 2:41 AM (GMT-08:00) To: > > > dev@kafka.apache.org Subject: [VOTE] KIP-334 Include partitions in > > > exceptions raised during consumer record deserialization/validation > > > Hey everybody, > > > > > > I'd like to start a vote thread for KIP-334 Include partitions in > > > exceptions raised during consumer record deserialization/validation > > > < > > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=87297793 > > > > > > > > > > -- > > > Best, > > > Stanislav > > > > > > > > -- > Best, > Stanislav