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