📄 loaderexception.java
字号:
/*
Loader - tool for transfering data from one JDBC source to another and
doing transformations during copy.
Copyright (C) 2002 Together
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
LoaderException.java
Date: 22.09.2001.
@version 1.0
@author:
Milosevic Sinisa
*/
package org.webdocwf.util.loader;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.io.PrintWriter;
/**
*
* LoaderException class is used for handling the exceptions in
* Enhydra Octopus application.
* @author Milosevic Sinisa
* @version 1.0
*/
public class LoaderException extends Exception {
private Throwable cause;
/**
* This is the public constructor with one parameter
* @param msg is constructor argument
*/
public LoaderException(String msg) {
super(msg);
cause = null;
}
/**
* This is the public constructor with two parameter
* @param msg is first constructor parameter
* @param cause is secund constructor parameter
*/
public LoaderException(String msg,
Throwable cause) {
super(msg);
this.cause = cause;
}
/**
* This method read message from exception object
* @return message
*/
public String getMessage() {
return super.getMessage();
}
/**
* Gets the exception associated with this exception.
* @return The exception or null if no cause is specified.
*/
public Throwable getCause() {
return cause;
}
/**
* Prints this ChainedException and its backtrace, and the causes
* and their stack traces to the standard error stream.
*/
public void printStackTrace() {
super.printStackTrace();
Throwable a = new Throwable();
a.printStackTrace();
}
/**
* Prints this LoaderException and its backtrace, and the causes
* and their stack traces to the e specified print stream.
* @param s represents PrintWriter stream
*/
public void printStackTrace(PrintStream s) {
super.printStackTrace(s);
Throwable a = new Throwable();
a.printStackTrace(s);
}
/**
* Prints this LoaderException and its backtrace, and the causes
* and their stack traces to the specified print writer.
* @param s represents PrintWriter stream
*/
public void printStackTrace(PrintWriter s) {
super.printStackTrace(s);
Throwable a = new Throwable();
a.printStackTrace(s);
}
/**
* Construct string with stack trace.
* @return String representation of stack trace.
*/
public String getStackTraceAsString() {
ByteArrayOutputStream out = new ByteArrayOutputStream();
this.printStackTrace(new PrintStream(out));
return out.toString();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -