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