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 no...@apache.org on 2006/06/01 19:18:17 UTC
svn commit: r410892 -
/james/server/trunk/src/java/org/apache/james/transport/matchers/RelayLimit.java
Author: norman
Date: Thu Jun 1 10:18:16 2006
New Revision: 410892
URL: http://svn.apache.org/viewvc?rev=410892&view=rev
Log:
Catch NumberParseException and throw new Exception with better log informations
Modified:
james/server/trunk/src/java/org/apache/james/transport/matchers/RelayLimit.java
Modified: james/server/trunk/src/java/org/apache/james/transport/matchers/RelayLimit.java
URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/transport/matchers/RelayLimit.java?rev=410892&r1=410891&r2=410892&view=diff
==============================================================================
--- james/server/trunk/src/java/org/apache/james/transport/matchers/RelayLimit.java (original)
+++ james/server/trunk/src/java/org/apache/james/transport/matchers/RelayLimit.java Thu Jun 1 10:18:16 2006
@@ -22,6 +22,7 @@
import org.apache.mailet.Mail;
import javax.mail.Header;
+import javax.mail.MessagingException;
import javax.mail.internet.MimeMessage;
import java.util.Collection;
import java.util.Enumeration;
@@ -34,8 +35,12 @@
public class RelayLimit extends GenericMatcher {
int limit = 30;
- public void init() {
- limit = Integer.parseInt(getCondition());
+ public void init() throws MessagingException {
+ try {
+ limit = Integer.parseInt(getCondition());
+ } catch (NumberFormatException e) {
+ throw new MessagingException("No valid integer: " + getCondition());
+ }
}
public Collection match(Mail mail) throws javax.mail.MessagingException {
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org