added error codes to NNTP exceptions
[org.ibex.mail.git] / 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;}