Class ComponentException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.apache.avalon.framework.CascadingException
-
- org.apache.avalon.framework.component.ComponentException
-
- All Implemented Interfaces:
java.io.Serializable
,CascadingThrowable
public class ComponentException extends CascadingException
The exception thrown to indicate a problem with Components. It is usually thrown by ComponentManager or ComponentSelector.Deprecated: Use
ServiceException
instead.- Version:
- $Id: ComponentException.java 30977 2004-07-30 03:57:54 -0500 (Fri, 30 Jul 2004) niclas $
- Author:
- Avalon Development Team
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
m_key
-
Constructor Summary
Constructors Constructor Description ComponentException(java.lang.String message)
Deprecated.use the String, String version to record the roleComponentException(java.lang.String key, java.lang.String message)
Construct a newComponentException
instance.ComponentException(java.lang.String key, java.lang.String message, java.lang.Throwable throwable)
Construct a newComponentException
instance.ComponentException(java.lang.String message, java.lang.Throwable throwable)
Deprecated.use the String, String, Throwable version to record the role
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
getKey()
Get the key which let to the exception.java.lang.String
getMessage()
Return a message describing the exception.java.lang.String
getRole()
Deprecated.Use getKey instead-
Methods inherited from class org.apache.avalon.framework.CascadingException
getCause
-
-
-
-
Constructor Detail
-
ComponentException
public ComponentException(java.lang.String key, java.lang.String message, java.lang.Throwable throwable)
Construct a newComponentException
instance.- Parameters:
key
- the lookup keymessage
- the exception messagethrowable
- the throwable
-
ComponentException
public ComponentException(java.lang.String message, java.lang.Throwable throwable)
Deprecated.use the String, String, Throwable version to record the roleConstruct a newComponentException
instance.- Parameters:
message
- the exception messagethrowable
- the throwable
-
ComponentException
public ComponentException(java.lang.String message)
Deprecated.use the String, String version to record the roleConstruct a newComponentException
instance.- Parameters:
message
- the exception message
-
ComponentException
public ComponentException(java.lang.String key, java.lang.String message)
Construct a newComponentException
instance.- Parameters:
key
- the lookup keymessage
- the exception message
-
-
Method Detail
-
getKey
public final java.lang.String getKey()
Get the key which let to the exception. May be null.- Returns:
- The key which let to the exception.
-
getRole
public final java.lang.String getRole()
Deprecated.Use getKey insteadGet the key which let to the exception. May be null.- Returns:
- The key which let to the exception.
-
getMessage
public java.lang.String getMessage()
Return a message describing the exception.- Overrides:
getMessage
in classjava.lang.Throwable
- Returns:
- exception message.
-
-