01: /*
02: * Copyright 2002 Gareth Cronin
03: * This software is subject to the GNU Lesser General Public Licence (LGPL)
04: */
05: package vqwiki.servlets;
06:
07: import javax.servlet.ServletException;
08: import org.apache.log4j.Logger;
09:
10: public class WikiServletException extends ServletException {
11:
12: protected static Logger logger = Logger
13: .getLogger(WikiServletException.class);
14: public final static int UNKNOWN = -1;
15: public final static int TOPIC_LOCKED = 0;
16: public final static int LOCK_TIMEOUT = 1;
17: public final static int READ_ONLY = 2;
18: protected int type;
19:
20: /**
21: *
22: */
23: public WikiServletException(String s) {
24: super (s);
25: this .type = -1;
26: }
27:
28: /**
29: *
30: */
31: public WikiServletException(int type) {
32: this .type = type;
33: }
34:
35: /**
36: *
37: */
38: public int getType() {
39: return type;
40: }
41:
42: /**
43: *
44: */
45: public void setType(int type) {
46: this .type = type;
47: }
48:
49: /**
50: *
51: */
52: public String toString() {
53: return super .toString() + "\nType: " + this .type + ", "
54: + this.getMessage();
55: }
56: }
|