View Javadoc

1   /**
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3    */
4   package net.sourceforge.pmd;
5   
6   /**
7    * A convenience exception wrapper.  Contains the original exception, if any.  Also, contains
8    * a severity number (int).  Zero implies no severity.  The higher the number the greater the
9    * severity.
10   *
11   * @author Donald A. Leckie
12   * @version $Revision$, $Date$
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  }