org.apache.avalon.framework.component

Class ComponentException

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

Field Summary
Stringm_key
Constructor Summary
ComponentException(String key, String message, Throwable throwable)
Construct a new ComponentException instance.
ComponentException(String message, Throwable throwable)
Construct a new ComponentException instance.
ComponentException(String message)
Construct a new ComponentException instance.
ComponentException(String key, String message)
Construct a new ComponentException instance.
Method Summary
StringgetKey()
Get the key which let to the exception.
StringgetMessage()
Return a message describing the exception.
StringgetRole()
Get the key which let to the exception.

Field Detail

m_key

private final String m_key

Constructor Detail

ComponentException

public ComponentException(String key, String message, Throwable throwable)
Construct a new ComponentException instance.

Parameters: key the lookup key message the exception message throwable the throwable

ComponentException

public ComponentException(String message, Throwable throwable)

Deprecated: use the String, String, Throwable version to record the role

Construct a new ComponentException instance.

Parameters: message the exception message throwable the throwable

ComponentException

public ComponentException(String message)

Deprecated: use the String, String version to record the role

Construct a new ComponentException instance.

Parameters: message the exception message

ComponentException

public ComponentException(String key, String message)
Construct a new ComponentException instance.

Parameters: key the lookup key message the exception message

Method Detail

getKey

public final String getKey()
Get the key which let to the exception. May be null.

Returns: The key which let to the exception.

getMessage

public String getMessage()
Return a message describing the exception.

Returns: exception message.

getRole

public final String getRole()

Deprecated: Use getKey instead

Get the key which let to the exception. May be null.

Returns: The key which let to the exception.