⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pmdexception.java

📁 检查Java程序漏洞
💻 JAVA
字号:
/** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html*/package net.sourceforge.pmd;import java.io.PrintStream;import java.io.PrintWriter;/** * A convenience exception wrapper.  Contains the original exception, if any.  Also, contains * a severity number (int).  Zero implies no severity.  The higher the number the greater the * severity. * * @author Donald A. Leckie * @since August 30, 2002 * @version $Revision: 1.4 $, $Date: 2003/11/19 21:27:11 $ */public class PMDException extends Exception {    private Exception reason;    private int severity;    public PMDException(String message) {        super(message);    }    public PMDException(String message, Exception reason) {        super(message);        this.reason = reason;    }    public void printStackTrace() {        printStackTrace(System.err);    }    public void printStackTrace(PrintStream s) {        super.printStackTrace(s);        if (this.reason != null) {            s.print("Caused by: ");            this.reason.printStackTrace(s);        }    }    public void printStackTrace(PrintWriter s) {        super.printStackTrace(s);        if (this.reason != null) {            s.print("Caused by: ");            this.reason.printStackTrace(s);        }    }    public Exception getReason() {        return reason;    }    public void setSeverity(int severity) {        this.severity = severity;    }    public int getSeverity() {        return severity;    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -