[Email-SIG] fixing the current email module
Steven D'Aprano
steve at pearwood.info
Fri Oct 9 04:10:40 CEST 2009
On Thu, 8 Oct 2009 08:18:40 pm Oleg Broytman wrote:
> > By keeping the various components clear in our mind, we can see
> > that both statements are correct in a sense. The parser and
> > generator should never raise exceptions. The model can and
> > probably should.
>
> Are you going to parse any garbage and create a Message (probably
> an empty Message) with one defect "cannot parse it at all"?
So long as the raw garbage is available for the caller somehow, that
seems like a reasonable approach to me. That lets an application
display "Unparsable message" to the user, who can then ask to "View
Source" (or equivalent) to get access to the raw bytes of the message.
--
Steven D'Aprano
More information about the Email-SIG
mailing list