added better message to Drop
authoradam <adam@megacz.com>
Sat, 15 Apr 2006 05:48:31 +0000 (05:48 +0000)
committeradam <adam@megacz.com>
Sat, 15 Apr 2006 05:48:31 +0000 (05:48 +0000)
darcs-hash:20060415054831-5007d-846302e22356ef0ec4e4ce4a44f4c71de1d5884a.gz

src/org/ibex/mail/target/Drop.java

index 7663936..f276871 100644 (file)
@@ -11,7 +11,10 @@ import org.ibex.mail.target.*;
 
 public class Drop extends JS.Obj implements Target {
     public static final Drop instance = new Drop();
+    public final String reason;
+    public Drop() { this(null); }
+    public Drop(String reason) { this.reason = reason; }
     public void accept(Message m) throws IOException, MailException {
-        Log.warn(this, "dropping message " + m.summary());
+        Log.warn(this, "dropping" +(reason==null?"":(" because "+reason))+ ": " + m.summary());
     }
 }