org.picocontainer
Class PicoException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.picocontainer.PicoException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
LifecycleComponentMonitor.LifecycleFailuresException, PicoInitializationException, PicoIntrospectionException, PicoLifecycleException, PicoRegistrationException, PicoVerificationException, PicoVisitorTraversalException

public abstract class PicoException
extends java.lang.RuntimeException

Superclass for all Exceptions in PicoContainer. You can use this if you want to catch all exceptions thrown by PicoContainer. Be aware that some parts of the PicoContainer API will also throw NullPointerException when null values are provided for method arguments, and this is not allowed.

Since:
1.0
Version:
$Revision: 1812 $
Author:
Paul Hammant, Aslak Hellesøy
See Also:
Serialized Form

Field Summary
private  java.lang.Throwable cause
          The exception that caused this one.
 
Constructor Summary
protected PicoException()
          Construct a new exception with no cause and no detail message.
protected PicoException(java.lang.String message)
          Construct a new exception with no cause and the specified detail message.
protected PicoException(java.lang.String message, java.lang.Throwable cause)
          Construct a new exception with the specified cause and the specified detail message.
protected PicoException(java.lang.Throwable cause)
          Construct a new exception with the specified cause and no detail message.
 
Method Summary
 java.lang.Throwable getCause()
          Retrieve the exception that caused this one.
 void printStackTrace()
          Overridden to provide 1.4 style stack traces on pre-1.4.
 void printStackTrace(java.io.PrintStream s)
          Overridden to provide 1.4 style stack traces on pre-1.4.
 void printStackTrace(java.io.PrintWriter s)
          Overridden to provide 1.4 style stack traces on pre-1.4.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cause

private java.lang.Throwable cause
The exception that caused this one.

Constructor Detail

PicoException

protected PicoException()
Construct a new exception with no cause and no detail message. Note modern JVMs may still track the exception that caused this one.


PicoException

protected PicoException(java.lang.String message)
Construct a new exception with no cause and the specified detail message. Note modern JVMs may still track the exception that caused this one.

Parameters:
message - the message detailing the exception.

PicoException

protected PicoException(java.lang.Throwable cause)
Construct a new exception with the specified cause and no detail message.

Parameters:
cause - the exception that caused this one.

PicoException

protected PicoException(java.lang.String message,
                        java.lang.Throwable cause)
Construct a new exception with the specified cause and the specified detail message.

Parameters:
message - the message detailing the exception.
cause - the exception that caused this one.
Method Detail

getCause

public java.lang.Throwable getCause()
Retrieve the exception that caused this one.

Overrides:
getCause in class java.lang.Throwable
Returns:
the exception that caused this one, or null if it was not set.
See Also:
the method available since JDK 1.4 that is overridden by this method.

printStackTrace

public void printStackTrace()
Overridden to provide 1.4 style stack traces on pre-1.4.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
s - the PrintStream used to print the stack trace

printStackTrace

public void printStackTrace(java.io.PrintStream s)
Overridden to provide 1.4 style stack traces on pre-1.4.

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintWriter s)
Overridden to provide 1.4 style stack traces on pre-1.4.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
s - the PrintWriter used to print the stack trace