01: package org.sakaibrary.xserver;
02:
03: public class XServerException extends Exception {
04:
05: private static final long serialVersionUID = 1L;
06:
07: // errorCode holds error_code from X-server
08: private String errorCode;
09:
10: /**
11: * Constructs a new MetaLibException with given errorCode and errorText
12: *
13: * @param errorCode String representing error_code sent from X-server
14: * @param errorText String representing error_text sent from X-server
15: */
16: public XServerException(String errorCode, String errorText) {
17: super (errorText);
18:
19: this .errorCode = errorCode;
20: }
21:
22: /**
23: * Gets error_text sent from X-server
24: *
25: * @return String representing error_text
26: */
27: public String getErrorText() {
28: return getMessage();
29: }
30:
31: /**
32: * Gets error_code sent from X-server
33: *
34: * @return String representing error_code
35: */
36: public String getErrorCode() {
37: return errorCode;
38: }
39: }
|