28 |
*/ |
*/ |
29 |
public class LSException extends Exception { |
public class LSException extends Exception { |
30 |
private int code; |
private int code; |
31 |
|
private String details = null; |
32 |
|
|
33 |
/** |
/** |
34 |
* Creates a new instance of LSException with the specified error code and detail message. |
* Creates a new instance of LSException with the specified error code and detail message. |
37 |
*/ |
*/ |
38 |
public |
public |
39 |
LSException(int code, String msg) { |
LSException(int code, String msg) { |
40 |
|
this(code, msg, null); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* Creates a new instance of LSException with the specified error code and detail message. |
45 |
|
* @param code Specifies the error code. |
46 |
|
* @param msg Specifies the detail message. |
47 |
|
*/ |
48 |
|
public |
49 |
|
LSException(int code, String msg, String details) { |
50 |
super(msg); |
super(msg); |
51 |
this.code = code; |
this.code = code; |
52 |
|
this.details = details; |
53 |
} |
} |
54 |
|
|
55 |
/** |
/** |
58 |
*/ |
*/ |
59 |
public int |
public int |
60 |
getCode() { return code; } |
getCode() { return code; } |
61 |
|
|
62 |
|
/** |
63 |
|
* Gets a detailed error report. |
64 |
|
* @return A detailed error report or <code>null</code> if there is no such. |
65 |
|
*/ |
66 |
|
public String |
67 |
|
getDetails() { return details; } |
68 |
} |
} |