public class ServiceException
extends java.lang.RuntimeException
A ServiceException object is created by the Framework or
service implementation to denote an exception condition in the service. A
type code is used to identify the exception type for future extendability.
Service implementations may also create subclasses of
ServiceException. When subclassing, the subclass should set
the type to SUBCLASSED to indicate that
ServiceException has been subclassed.
This exception conforms to the general purpose exception chaining mechanism.
| Modifier and Type | Field | Description |
|---|---|---|
static int |
FACTORY_ERROR |
The service factory produced an invalid service object.
|
static int |
FACTORY_EXCEPTION |
The service factory threw an exception.
|
static int |
REMOTE |
An error occurred invoking a remote service.
|
static int |
SUBCLASSED |
The exception is a subclass of ServiceException.
|
static int |
UNREGISTERED |
The service has been unregistered.
|
static int |
UNSPECIFIED |
No exception type is unspecified.
|
| Constructor | Description |
|---|---|
ServiceException(java.lang.String msg) |
Creates a
ServiceException with the specified message. |
ServiceException(java.lang.String msg,
int type) |
Creates a
ServiceException with the specified message and
type. |
ServiceException(java.lang.String msg,
int type,
java.lang.Throwable cause) |
Creates a
ServiceException with the specified message,
type and exception cause. |
ServiceException(java.lang.String msg,
java.lang.Throwable cause) |
Creates a
ServiceException with the specified message and
exception cause. |
| Modifier and Type | Method | Description |
|---|---|---|
int |
getType() |
Returns the type for this exception or
UNSPECIFIED if the
type was unspecified or unknown. |
public static final int UNSPECIFIED
public static final int UNREGISTERED
public static final int FACTORY_ERROR
public static final int FACTORY_EXCEPTION
public static final int SUBCLASSED
public static final int REMOTE
public ServiceException(java.lang.String msg,
java.lang.Throwable cause)
ServiceException with the specified message and
exception cause.msg - The associated message.cause - The cause of this exception.public ServiceException(java.lang.String msg)
ServiceException with the specified message.msg - The message.public ServiceException(java.lang.String msg,
int type,
java.lang.Throwable cause)
ServiceException with the specified message,
type and exception cause.msg - The associated message.type - The type for this exception.cause - The cause of this exception.public ServiceException(java.lang.String msg,
int type)
ServiceException with the specified message and
type.msg - The message.type - The type for this exception.