james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Danny Angus <Danny_An...@slc.co.uk>
Subject Re: MailetException vs MessagingException
Date Tue, 21 Oct 2003 08:14:33 GMT


Danny Angus wrote:
>>>Maybe given that we have to catch Exception in the mailet container no
>>>matter what (you can't have runtime exceptions breaking processors), we
>>>should remove MailetException and change the API to "throws Exception".
>> IMO we do want to distingush between two cases,
>Yeah, but how?  MessagingException includes exceptions that do not
>relate to underlying problems.  For example, if I have my mailet's init
>construct an InternetAddressed based on some configuration parameter,
>that will throw a MessagingException.

Good point, but there is an option for the mailet to catch this and
selectively re-throw MessagingException or MailetException.

>> What I think is probably bad is for both cases to be an instance of (and
>> castable to) the same exception, particularly if we think that
>> should be handling them in different ways.
>How would you have developers handle these differently?  Ideally I'd
>rather not have to require the developers to worry about underlying
>store exceptions, but to remove that worry, we prevent us from being
>able to handle much at all.

Simply by stating that MailetExceptions would be used to indicate an
irrecoverable failure of the component to complete its task, throwing a
MailetException will indicate that the container can abandon further
attempts to pass this mail through this component, and change its state
immediately to ERROR with the exception message as the error message.

However I agree that as messaging exceptions caused by things like illegal
addresses are NOT transitory this would in practice just become messy.


The information in this e-mail is confidential and for use by the addressee(s) only. If you
are not the intended recipient (or responsible for delivery of the message to the intended
recipient) please notify us immediately on 0141 306 2050 and delete the message from your
computer. You may not copy or forward it or use or disclose its contents to any other person.
As Internet communications are capable of data corruption Student Loans Company Limited does
not accept any  responsibility for changes made to this message after it was sent. For this
reason it may be inappropriate to rely on advice or opinions contained in an e-mail without
obtaining written confirmation of it. Neither Student Loans Company Limited or the sender
accepts any liability or responsibility for viruses as it is your responsibility to scan attachments
(if any). Opinions and views expressed in this e-mail are those of the sender and may not
reflect the opinions and views of The Student Loans Company Limited.

This footnote also confirms that this email message has been swept for the presence of computer


To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message