[ 
https://issues.apache.org/jira/browse/MIME4J-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632935#action_12632935
 ] 

Robert Burrell Donkin commented on MIME4J-73:
---------------------------------------------

>Oleg Kalnichevski - 19/Sep/08 11:41 AM
>> * MimeException extends Exception
>
>+1. I generally like a clear distinction between protocol exceptions (usually 
>fatal) and I/O exceptions (usually recoverable). 
> However, this can be potentially contentious and certainly should be 
> discussed as a separate issue.

this is contentious please don't include this in the patch. i've created a 
separate issue for discussions https://issues.apache.org/jira/browse/MIME4J-77

> * Message(InputStream), Header(InputStream) and Field.parse(String) throw a 
> MimeException instead of a runtime exception
>
>+1

+1

> * Message.MessageBuilder becomes a public static inner class so it can be 
> subclassed
>
> +1. I would even suggest factoring MessageBuilder into a separate public 
> class.

+1 should be separate public class

Robert 

> IllegalArgumentException in Message constructor when parsing erroneous message
> ------------------------------------------------------------------------------
>
>                 Key: MIME4J-73
>                 URL: https://issues.apache.org/jira/browse/MIME4J-73
>             Project: JAMES Mime4j
>          Issue Type: Bug
>    Affects Versions: 0.4
>            Reporter: Markus Wiederkehr
>             Fix For: 0.5
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to