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

📄 ccexception.java~37~

📁 一个完整的门户网站,基于JSP环境下开发的,使用SQL数据库.
💻 JAVA~37~
字号:
package com.bwm.coreclass;

import com.bwm.coreinterface.CIException;
import java.io.PrintStream;
import java.io.PrintWriter;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2004</p>
 * <p>Company: MR</p>
 * @author BWM
 * @version 1.0
 */

public class CCException extends RuntimeException implements CIException {

    private Throwable cceroot;

    public CCException() {
        super();
    }

    public CCException(String message) {
        super(message);
    }

    public CCException(String message, Throwable cause) {
        super(message);
        cceroot = cause;
    }

    public Throwable getCCEroot() {
        return cceroot;
    }

    public void printStackTrace() {
        printStackTrace(System.err)
    }

    public void printStackTrace(PrintStream ps) {
        if (cceroot == null) {
            super.printStackTrace(ps);
        } else {
            ps.println(this);
            cceroot.printStackTrace(ps);
        }
    }

    public void printStackTrace(PrintWriter pw) {
        if (cceroot == null) {
            super.printStackTrace(pw);
        } else {
            pw.println(this);
            cceroot.printStackTrace(pw);
        }
    }

    public String getMessage() {
        if (cceroot == null) {
            return super.getMessage();
        } else {
            return super.getMessage() + "' CCException is: \n\t" + cceroot.getMessage();
        }
    }
}

⌨️ 快捷键说明

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