Robert Burrell Donkin ha scritto:
> On 8/6/07, Stefano Bagnara <[EMAIL PROTECTED]> wrote:
>> Robert Burrell Donkin (JIRA) ha scritto:
>>>     [ 
>>> https://issues.apache.org/jira/browse/MIME4J-23?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518011
>>>  ]
>>>
>>> Robert Burrell Donkin commented on MIME4J-23:
>>> ---------------------------------------------
>>>
>>> Optional may be better than dropping. There are times when good enough is 
>>> best when dealing with emails.
>>>
>>> Perhaps monitor pattern (recording them as events) would be useful
>> I never used the monitor pattern for server side libraries, but I'm
>> interested in how it could apply to this scenario.
>>
>> From a developer perspective it seems to be more easy to receive
>> exceptions on failure when a strict parsing is enabled, but maybe both
>> solutions can be enabled providing a wrapper that will parse the
>> message, listen for events and throw exceptions when a given event is
>> received.
> 
> the current, lazy behaviour is useful for some use case. throwing an
> exception generally means that it's impossible to continue. with a
> pull parser, one option is to report each error as an additional event
> in the stream. the current lazy behaviour could be retained by
> introducing a flag for reporting these events.

Introducing parsing errors as event in the stream seems a good plan to me.

I'm not sure I understand where, in the code, this should be handled,
but I'll review the code!

I agree that a generic library (like mime4j) should support both the
strict and the relaxed parsing.

Stefano


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to