org.logicalcobwebs.proxool
类 ProxoolException

java.lang.Object
  继承者 java.lang.Throwable
      继承者 java.lang.Exception
          继承者 org.logicalcobwebs.proxool.ProxoolException
所有已实现的接口:
Serializable

public class ProxoolException
extends Exception

Proxool exception class that emulates the behaviour of the new cause facility in jdk 1.4. It is also known as the chained exception facility, as the cause can, itself, have a cause, and so on, leading to a "chain" of exceptions, each caused by another.

A cause can be associated with a throwable in two ways: via a constructor that takes the cause as an argument, or via the initCause(Throwable) method. New throwable classes that wish to allow causes to be associated with them should provide constructors that take a cause and delegate (perhaps indirectly) to one of the Throwable constructors that takes a cause.

从以下版本开始:
Proxool 0.6
版本:
$Revision: 1.2 $, $Date: 2003/03/03 11:11:58 $
作者:
Christian Nedregaard (christian_nedregaard@email.com), $Author: billhorsman $ (current maintainer)
另请参见:
序列化表格

构造方法摘要
ProxoolException()
          Constructs a new instance with null as its detail message.
ProxoolException(String message)
          Constructs a new instance with the specified detail message.
ProxoolException(String message, Throwable cause)
          Constructs a new instance with the specified detail message and cause.
ProxoolException(Throwable cause)
          Constructs a new throwable with the specified cause and a detail message of (cause==null ?
 
方法摘要
 Throwable getCause()
          Returns the cause of this exception or null if the cause is nonexistent or unknown.
 Throwable initCause(Throwable cause)
          Initializes the cause of this exception to the specified value.
 void printStackTrace()
          Prints this ProxoolException and its backtrace to the standard error stream.
 void printStackTrace(PrintStream stream)
          Prints this ProxoolException and its backtrace to the specified print stream.
 void printStackTrace(PrintWriter writer)
          Prints this ProxoolException and its backtrace to the specified print writer.
 
从类 java.lang.Throwable 继承的方法
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, setStackTrace, toString
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

ProxoolException

public ProxoolException()
Constructs a new instance with null as its detail message. The cause is not initialized, and may subsequently be initialized by a call to initCause(java.lang.Throwable).


ProxoolException

public ProxoolException(String message)
Constructs a new instance with the specified detail message. The cause is not initialized, and may subsequently be initialized by a call to initCause(java.lang.Throwable).

参数:
message - the detail message. The detail message is saved for later retrieval by the Throwable.getMessage() method.

ProxoolException

public ProxoolException(String message,
                        Throwable cause)
Constructs a new instance with the specified detail message and cause.

Note that the detail message associated with cause is not automatically incorporated in this throwable's detail message.

参数:
message - the detail message (which is saved for later retrieval by the Throwable.getMessage() method).
cause - the cause (which is saved for later retrieval by the getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

ProxoolException

public ProxoolException(Throwable cause)
Constructs a new throwable with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause). This constructor is useful for throwables that are little more than wrappers for other throwables.

参数:
cause - the cause (which is saved for later retrieval by the getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
方法详细信息

getCause

public Throwable getCause()
Returns the cause of this exception or null if the cause is nonexistent or unknown. (The cause is the throwable that caused this exception to get thrown.)

This implementation returns the cause that was supplied via one of the constructors requiring a Throwable, or that was set after creation with the initCause(Throwable) method.

覆盖:
Throwable 中的 getCause
返回:
the cause of this throwable or null if the cause is nonexistent or unknown.

initCause

public Throwable initCause(Throwable cause)
Initializes the cause of this exception to the specified value. (The cause is the throwable that caused this exception to get thrown.)

This method can be called at most once. It is generally called from within the constructor, or immediately after creating the throwable. If this throwable was created with ProxoolException(Throwable) or ProxoolException(String,Throwable), this method cannot be called even once.

覆盖:
Throwable 中的 initCause
参数:
cause - the cause (which is saved for later retrieval by the getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
返回:
a reference to this ProxoolException instance.

printStackTrace

public void printStackTrace()
Prints this ProxoolException and its backtrace to the standard error stream. The backtrace for a ProxoolException with an initialized, non-null cause should generally include the backtrace for the cause.

覆盖:
Throwable 中的 printStackTrace

printStackTrace

public void printStackTrace(PrintStream stream)
Prints this ProxoolException and its backtrace to the specified print stream.

覆盖:
Throwable 中的 printStackTrace
参数:
stream - PrintStream to use for output

printStackTrace

public void printStackTrace(PrintWriter writer)
Prints this ProxoolException and its backtrace to the specified print writer.

覆盖:
Throwable 中的 printStackTrace
参数:
writer - PrintWriter to use for output


Copyright © 2014. All rights reserved.