|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception java.io.IOException java.rmi.RemoteException org.apache.axis.AxisFault com.gridsystems.innergrid.kernel.KernelException
public class KernelException
Exception type for all published APIs.
All exceptions should be converted into a KernelException before being thrown in a public API method. Internal methods can also throw a KernelException if an error is considered to be of interest for a public API calling them.
Subclassing is highly encouraged for improving code readability and maintainability.
For those cases where another base exception class is mandatory, see the
Kernelizable
interface.
IMPORTANT: The parameter list is transferred to the client side as a string list. Methods for parsing those strings will be convenient if there is a need of obtaining the original values in the client.
Kernelizable
,
Serialized FormField Summary | |
---|---|
protected java.lang.String |
msg
The message for this exception. |
protected java.lang.Object[] |
params
The list of error message parameters. |
protected java.lang.String |
pattern
The pattern used to generate the message. |
Fields inherited from class org.apache.axis.AxisFault |
---|
faultActor, faultCode, faultDetails, faultHeaders, faultNode, faultString, faultSubCode, log |
Fields inherited from class java.rmi.RemoteException |
---|
detail |
Constructor Summary | |
---|---|
KernelException(javax.xml.namespace.QName code,
java.lang.String pattern,
java.lang.Object[] params,
java.lang.Throwable cause)
Deprecated. |
|
KernelException(java.lang.String code,
java.lang.String pattern,
java.lang.Object[] params,
java.lang.Throwable cause)
Deprecated. |
|
KernelException(java.lang.Throwable cause,
javax.xml.namespace.QName code,
java.lang.String pattern,
java.lang.Object... params)
Creates an instance with a fixed message (no I18N). |
|
KernelException(java.lang.Throwable cause,
java.lang.String code,
java.lang.String pattern,
java.lang.Object... params)
Creates an instance with a fixed message (no I18N). |
Method Summary | |
---|---|
static KernelException |
fromRemoteException(java.rmi.RemoteException e)
Parses a RemoteException instance, and if it contains a KernelException, returns a properly initialized one. |
java.lang.String |
getCode()
Gets this instance error code. |
java.lang.String |
getMessage()
Gets this exception message. |
java.lang.String |
getNamespace()
Gets this fault code namespace. |
java.lang.Object[] |
getParams()
Gets the list of parameters for this exception message. |
java.lang.String |
getPattern()
Gets this exception pattern. |
boolean |
hasCode(java.lang.String code)
Compares this instance error code with the specified one and returns true if they are equals. |
void |
output(org.apache.axis.encoding.SerializationContext context)
Fixes the internal AxisFault detail list with the extensions of KernelException. |
protected void |
prepare()
Inserts all non-standard field values as XML elements into the details section of the SOAP exception. |
void |
printStackTrace(java.io.PrintStream out)
Stripped stacktrace. |
void |
printStackTrace(java.io.PrintWriter out)
Stripped stacktrace. |
KernelException |
toKernelException()
Converts this instance into a KernelException. |
java.lang.String |
toString()
Overrides the default implementation, returning the concatenation of this exception code and message. |
Methods inherited from class org.apache.axis.AxisFault |
---|
addFaultDetail, addFaultDetail, addFaultDetailString, addFaultSubCode, addFaultSubCodeAsString, addHeader, addHostname, addHostnameIfNeeded, clearFaultDetails, clearFaultSubCodes, clearHeaders, dump, dumpToString, getFaultActor, getFaultCode, getFaultDetails, getFaultNode, getFaultReason, getFaultRole, getFaultString, getFaultSubCodes, getHeaders, initFaultSubCodes, lookupFaultDetail, makeFault, removeFaultDetail, removeHostname, setFaultActor, setFaultCode, setFaultCode, setFaultCodeAsString, setFaultDetail, setFaultDetailString, setFaultNode, setFaultReason, setFaultRole, setFaultString, writeDetails |
Methods inherited from class java.rmi.RemoteException |
---|
getCause |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String msg
protected java.lang.String pattern
protected java.lang.Object[] params
Constructor Detail |
---|
public KernelException(java.lang.String code, java.lang.String pattern, java.lang.Object[] params, java.lang.Throwable cause)
code
- The error codepattern
- The message pattern (without parameter replacement)params
- The error message parameterscause
- The root causepublic KernelException(javax.xml.namespace.QName code, java.lang.String pattern, java.lang.Object[] params, java.lang.Throwable cause)
code
- The fully qualified error codepattern
- The message pattern (without parameter replacement)params
- The error message parameterscause
- The root causepublic KernelException(java.lang.Throwable cause, java.lang.String code, java.lang.String pattern, java.lang.Object... params)
cause
- Root causecode
- Error codepattern
- Message pattern (without parameter replacement)params
- Message parameterspublic KernelException(java.lang.Throwable cause, javax.xml.namespace.QName code, java.lang.String pattern, java.lang.Object... params)
cause
- Root causecode
- Fully qualified error codepattern
- Message pattern (without parameter replacement)params
- Message parametersMethod Detail |
---|
public java.lang.String getCode()
public boolean hasCode(java.lang.String code)
code
- The code to compare to
public java.lang.String getNamespace()
public java.lang.Object[] getParams()
public java.lang.String getMessage()
The message is obtained from the pattern and the list of parameters.
getMessage
in class java.rmi.RemoteException
public java.lang.String getPattern()
public java.lang.String toString()
toString
in class org.apache.axis.AxisFault
public static KernelException fromRemoteException(java.rmi.RemoteException e)
e
- The source remote exception
public KernelException toKernelException()
toKernelException
in interface Kernelizable
public void output(org.apache.axis.encoding.SerializationContext context) throws java.lang.Exception
output
in class org.apache.axis.AxisFault
context
- The serialization context passed from the Axis servlet
java.lang.Exception
- if an error occurs while serializing the exceptionprotected void prepare()
public void printStackTrace(java.io.PrintWriter out)
printStackTrace
in class org.apache.axis.AxisFault
public void printStackTrace(java.io.PrintStream out)
printStackTrace
in class org.apache.axis.AxisFault
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |