You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mime4j-dev@james.apache.org by "Oleg Kalnichevski (JIRA)" <mi...@james.apache.org> on 2009/06/10 10:17:07 UTC

[jira] Issue Comment Edited: (MIME4J-137) Rewrite MimeIOException eliminate unecessary MimeException and provide general constructors

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

Oleg Kalnichevski edited comment on MIME4J-137 at 6/10/09 1:15 AM:
-------------------------------------------------------------------

> What would be the use case for catching a MimeIOException and then throwing MimeException?

In short, exception handling and error recovery. 

IOExceptions are meant to represent transport errors, potentially recoverable, whereas MimeExceptions are meant to represent protocol errors, potentially fatal. I personally consider such distinction quite important. There are situations when protocol errors can only be signaled by throwing an exception derived from IOException class. In this case it makes sense to rethrow MimeIOException as MimeException at a higher level.

Oleg

      was (Author: olegk):
    > What would be the use case for catching a MimeIOException and then throwing MimeException?

In short, exception handling and error recovery. 

IOExceptions are meant to represent transport errors, potentially recoverable, whereas MimeExceptions are meant to represent protocol, potentially fatal. I personally consider such distinction quite important. There are situations when protocol errors can only be signaled by throwing an exception derived from IOException class. In this case it makes sense to rethrow MimeIOException as MimeException at a higher level.

Oleg
  
> 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: mime4j-137.patch, 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.