added error codes to NNTP exceptions
authoradam <adam@megacz.com>
Fri, 7 Jan 2005 18:18:53 +0000 (18:18 +0000)
committeradam <adam@megacz.com>
Fri, 7 Jan 2005 18:18:53 +0000 (18:18 +0000)
darcs-hash:20050107181853-5007d-f495ac731db58ba3de19893d8535c8dbb659dff0.gz

src/org/ibex/mail/protocol/NNTP.java

index 87e968d..2be4c8c 100644 (file)
@@ -18,8 +18,8 @@ public class NNTP {
 
     // FIXME: command lines limited to 512 chars
 
-    public static class No  extends RuntimeException { int code = 0; }    // 4xx response codes
-    public static class Bad extends RuntimeException { int code = 0; }    // 5xx response codes
+    public static class No  extends RuntimeException { int code = 400; }    // 4xx response codes
+    public static class Bad extends RuntimeException { int code = 500; public Bad(String s) { super(s); } }    // 5xx response codes
 
     public static class Group {
         public Group(String n, boolean p, int f, int l, int c) { this.name=n;this.post=p;this.first=f;this.last=l;this.count=c;}