You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Jukka Zitting (JIRA)" <se...@james.apache.org> on 2007/05/17 22:39:16 UTC

[jira] Updated: (MIME4J-16) Allow exceptions from a ContentHandler

     [ https://issues.apache.org/jira/browse/MIME4J-16?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting updated MIME4J-16:
--------------------------------

    Attachment: MimeException.patch

Attached a patch (MimeException.patch) that implements the proposed change.

> Allow exceptions from a ContentHandler
> --------------------------------------
>
>                 Key: MIME4J-16
>                 URL: https://issues.apache.org/jira/browse/MIME4J-16
>             Project: Mime4j
>          Issue Type: Improvement
>            Reporter: Jukka Zitting
>         Attachments: MimeException.patch
>
>
> There is currently no good way for a Mime4j ContentHandler to indicate that it has failed to process a message event and that no further events should be generated. Compare this with for example the SAX ContentHandler interface that allows implementing classes to throw SAXExceptions.
> Being able to throw such processing exceptions is important for example for a handler that wants to incrementally store a message in a backend store like a relational database or a JCR content repository.
> My proposal is to add a new MimeException exception class and allow it to be thrown from any of the ContentHandler methods. Such a change would be incompatible with any parser and other classes that call the ContentHandler methods (even indirectly, for example through the MimeStreamParser class), but existing classes that implement the ContentHandler interface would not be affected.

-- 
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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org