dbconnexception.java

来自「前台:文章浏览、发表留言、Game、Music 后台:文章相关:发表文章、修改文」· Java 代码 · 共 68 行

JAVA
68
字号
package com.yhcms.db;import java.io.PrintStream;import java.io.PrintWriter;/** * <p>Title:数据库操作的各种异常</p> * <b>CopyRight: yyhweb[由由华网]</b> * @author stephen * @version YH-2.0 */public class DBConnException extends Exception {	private static final long serialVersionUID = 1L;	private Throwable throwable;    /**     *  DBConnException 无参数构造函数     */    public DBConnException() {        this.throwable = null;    }    /** DBConnException 构造函数     * @param s     */    public DBConnException(String s) {        super(s);        this.throwable = null;    }    /** DBConnException 构造函数     * @param throwable     */    public DBConnException(Throwable throwable) {    	this.throwable = null;    	this.throwable = throwable;    }    /** DBConnException 构造函数     * @param s     * @param throwable     */    public DBConnException(String s, Throwable throwable) {        super(s);        this.throwable = null;        this.throwable = throwable;    }    public void printStackTrace() {        super.printStackTrace();        if(throwable != null)            throwable.printStackTrace();    }    public void printStackTrace(PrintStream printstream) {        super.printStackTrace(printstream);        if(throwable != null)            throwable.printStackTrace(printstream);    }    public void printStackTrace(PrintWriter printwriter) {        super.printStackTrace(printwriter);        if(throwable != null)            throwable.printStackTrace(printwriter);    }}

⌨️ 快捷键说明

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