01: /**
02: * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
03: */package net.sourceforge.pmd;
04:
05: /**
06: * A convenience exception wrapper. Contains the original exception, if any. Also, contains
07: * a severity number (int). Zero implies no severity. The higher the number the greater the
08: * severity.
09: *
10: * @author Donald A. Leckie
11: * @version $Revision: 5681 $, $Date: 2007-11-30 14:00:56 -0800 (Fri, 30 Nov 2007) $
12: * @since August 30, 2002
13: */
14: public class PMDException extends Exception {
15: private static final long serialVersionUID = 6938647389367956874L;
16:
17: private int severity;
18:
19: public PMDException(String message) {
20: super (message);
21: }
22:
23: public PMDException(String message, Exception reason) {
24: super (message, reason);
25: }
26:
27: /**
28: * Returns the cause of this exception or <code>null</code>
29: *
30: * @return the cause of this exception or <code>null</code>
31: * @deprecated use {@link #getCause()} instead
32: */
33: @Deprecated
34: public Exception getReason() {
35: return (Exception) getCause();
36: }
37:
38: public void setSeverity(int severity) {
39: this .severity = severity;
40: }
41:
42: public int getSeverity() {
43: return severity;
44: }
45: }
|