Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.4
-
None
-
None
Description
The constructor of Message(InputStream) uses its inner class MessageBuilder to parse the input stream and create the object. The method MessageBuilder.field(String) calls Field.parse(String) to parse header fields. This method throws an IllegalArgumentException on parse errors.
Clearly the Message constructor should throw a MimeException instead of an IllegalArgumentException if an invalid header field is encountered (or else it should simply ignore the field). So either Field.parse(String) should throw a MimeException or MessageBuilder.field(String) should catch and convert it.
And by the way, could you make MessageBuilder public so it can be extended if a slightly different behavior is desired.
Attachments
Attachments
Issue Links
- relates to
-
MIME4J-77 Decide Whether MimeException should extend IOException
- Closed