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

📄 factoryexception.java

📁 OS(OpenSymphony)的SiteMesh是一个用来在JSP中实现页面布局和装饰(layout and decoration)的框架组件
💻 JAVA
字号:
/* * Title:        FactoryException * Description: * * This software is published under the terms of the OpenSymphony Software * License version 1.1, of which a copy has been included with this * distribution in the LICENSE.txt file. */package com.opensymphony.module.sitemesh.factory;import java.io.PrintStream;import java.io.PrintWriter;/** * This RuntimeException is thrown by the Factory if it cannot initialize or perform * an appropriate function. * * @author <a href="mailto:joe@truemesh.com">Joe Walnes</a> * @version $Revision: 1.2 $ */public class FactoryException extends RuntimeException {	protected Throwable exception = null;	public FactoryException() {		super();	}	public FactoryException(String msg) {		super(msg);	}	public FactoryException(Exception e) {		super();		exception = e;	}	public FactoryException(String msg, Throwable e) {		super(msg + ": " + e);		exception = e;	}	/**	 * Get the original cause of the Exception. Returns null if not known.	 */	public Throwable getRootCause() {		return exception;	}    public void printStackTrace() {  	    super.printStackTrace();      	if (exception != null) {            synchronized (System.err) {    	        System.err.println("\nRoot cause:");    		    exception.printStackTrace();       	    }	   	}    }    public void printStackTrace(PrintStream s) {        super.printStackTrace(s);      	if (exception != null) {            synchronized (s) {      	        s.println("\nRoot cause:");        		exception.printStackTrace(s);            }        }    }	public void printStackTrace(PrintWriter s) {  	    super.printStackTrace(s);        if (exception != null) {		    synchronized (s) {          	    s.println("\nRoot cause:");        		exception.printStackTrace(s);            }		}    }}

⌨️ 快捷键说明

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