1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.apache.struts2;
23
24 import com.opensymphony.xwork2.XWorkException;
25 import com.opensymphony.xwork2.util.location.Locatable;
26
27
28 /***
29 * A generic runtime exception that optionally contains Location information
30 */
31 public class StrutsException extends XWorkException implements Locatable {
32
33 private static final long serialVersionUID = 888724366243600135L;
34
35
36 /***
37 * Constructs a <code>StrutsException</code> with no detail message.
38 */
39 public StrutsException() {
40 }
41
42 /***
43 * Constructs a <code>StrutsException</code> with the specified
44 * detail message.
45 *
46 * @param s the detail message.
47 */
48 public StrutsException(String s) {
49 this(s, null, null);
50 }
51
52 /***
53 * Constructs a <code>StrutsException</code> with the specified
54 * detail message and target.
55 *
56 * @param s the detail message.
57 * @param target the target of the exception.
58 */
59 public StrutsException(String s, Object target) {
60 this(s, (Throwable) null, target);
61 }
62
63 /***
64 * Constructs a <code>StrutsException</code> with the root cause
65 *
66 * @param cause The wrapped exception
67 */
68 public StrutsException(Throwable cause) {
69 this(null, cause, null);
70 }
71
72 /***
73 * Constructs a <code>StrutsException</code> with the root cause and target
74 *
75 * @param cause The wrapped exception
76 * @param target The target of the exception
77 */
78 public StrutsException(Throwable cause, Object target) {
79 this(null, cause, target);
80 }
81
82 /***
83 * Constructs a <code>StrutsException</code> with the specified
84 * detail message and exception cause.
85 *
86 * @param s the detail message.
87 * @param cause the wrapped exception
88 */
89 public StrutsException(String s, Throwable cause) {
90 this(s, cause, null);
91 }
92
93
94 /***
95 * Constructs a <code>StrutsException</code> with the specified
96 * detail message, cause, and target
97 *
98 * @param s the detail message.
99 * @param cause The wrapped exception
100 * @param target The target of the exception
101 */
102 public StrutsException(String s, Throwable cause, Object target) {
103 super(s, cause, target);
104 }
105 }