On Tue, Oct 25, 2016 at 4:45 PM, Gary Gregory <garydgreg...@gmail.com> wrote:
> Or IllegalStateExecption?

Bit generic, and not to be used inflationary. I'd clearly prefer a
custom RuntimeException, as suggested by Benedikt.

> On Oct 25, 2016 2:31 AM, "Benedikt Ritter" <brit...@apache.org> wrote:
>
>> Hi,
>>
>> in our iterator implementation returned by CSVParser.iterator() we wrap
>> IOExceptions into RuntimeExceptions because we cannot throw IOException
>> from the iterator methods. For this reason, user code has to catch
>> RuntimeException in order to recover from parsing failures.
>> I was thinking whether it would be better to define a custom
>> RuntimeException, say CSVParsingException extends RuntimeException so user
>> code can only react to this kind of failures.
>>
>> WDYT?
>>
>> Benedikt
>>



-- 
The next time you hear: "Don't reinvent the wheel!"

http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/evolution-of-the-wheel-300x85.jpg

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to