james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Beyer (JIRA)" <mime4j-...@james.apache.org>
Subject [jira] Commented: (MIME4J-137) Rewrite MimeIOException eliminate unecessary MimeException and provide general constructors
Date Tue, 09 Jun 2009 02:42:07 GMT

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

Nathan Beyer commented on MIME4J-137:
-------------------------------------

What's the value of MimeException being guaranteed as the cause? It's very confusing right
now to catch an exception and it has a cause that has nothing to do with the actual error.

This frequently happens. The MaxLineLimitException, which extends from MimeIOException, is
thrown in several places and that exception can only be constructed with a detail message.
The cause of this exception is meaningless - there is no cause.

As for the actual use of MimeIOException to wrap a MimeException - it's only used in the 'message'
sub-package in two spots. For all the discussion on MIME4J-77, I'd expect much more use of
it than that. The MaxLineLimitException is used more frequently and it never wraps a MimeIOException.

I rewrote the entire exception based on this usage. If you want the usage described, then
I would suggest removing the artificially created MimeException in the MimeIOException(String)
constructor alone. Would that be amenable?

> Rewrite MimeIOException eliminate unecessary MimeException and provide general constructors
> -------------------------------------------------------------------------------------------
>
>                 Key: MIME4J-137
>                 URL: https://issues.apache.org/jira/browse/MIME4J-137
>             Project: JAMES Mime4j
>          Issue Type: Improvement
>    Affects Versions: 0.6
>            Reporter: Nathan Beyer
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: MimeIOException.patch
>
>
> Rewrite the MimeIOException class to eliminate the hidden construction of a MimeException
and provide a more conventional set of constructors.

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


Mime
View raw message