org.apache.avalon.framework.service

Class ServiceException

public class ServiceException extends CascadingException

The exception thrown to indicate a problem with service. It is usually thrown by ServiceManager or ServiceSelector.

Version: $Id: ServiceException.java 30977 2004-07-30 03:57:54 -0500 (Fri, 30 Jul 2004) niclas $

Author: Avalon Development Team

Field Summary
Stringm_key
Constructor Summary
ServiceException(String message, Throwable throwable)
Construct a new ServiceException instance.
ServiceException(String key, String message, Throwable throwable)
Construct a new ServiceException instance.
ServiceException(String message)
Construct a new ServiceException instance.
ServiceException(String key, String message)
Construct a new ServiceException instance.
Method Summary
StringgetKey()
Return the key that caused the exception.
StringgetMessage()
Override super's message to add role if applicable.
StringgetRole()
Return the role that caused the exception

Field Detail

m_key

private final String m_key

Constructor Detail

ServiceException

public ServiceException(String message, Throwable throwable)

Deprecated: use the String,String,Throwable version instead

Construct a new ServiceException instance.

Parameters: message the exception message throwable the throwable

ServiceException

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

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

ServiceException

public ServiceException(String message)

Deprecated: use the String,String version instead

Construct a new ServiceException instance.

Parameters: message the exception message

ServiceException

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

Parameters: key the lookup key message the exception message

Method Detail

getKey

public String getKey()
Return the key that caused the exception.

Returns: the lookup key triggering the exception

getMessage

public String getMessage()
Override super's message to add role if applicable.

Returns: a message.

getRole

public String getRole()

Deprecated: Use getKey() instead

Return the role that caused the exception

Returns: the the lookup key triggering the exception