PMDException.java
01 /**
02  * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
03  */
04 package net.sourceforge.pmd;
05 
06 /**
07  * A convenience exception wrapper.  Contains the original exception, if any.  Also, contains
08  * a severity number (int).  Zero implies no severity.  The higher the number the greater the
09  * severity.
10  *
11  @author Donald A. Leckie
12  @version $Revision: 6550 $, $Date: 2008-10-02 07:33:16 +0200 (jeu. 02 oct. 2008) $
13  @since August 30, 2002
14  */
15 public class PMDException extends Exception {
16     private static final long serialVersionUID = 6938647389367956874L;
17 
18     private int severity;
19 
20     public PMDException(String message) {
21         super(message);
22     }
23 
24     public PMDException(String message, Exception reason) {
25         super(message, reason);
26     }
27 
28     public void setSeverity(int severity) {
29         this.severity = severity;
30     }
31 
32     public int getSeverity() {
33         return severity;
34     }
35 }