org.openmdx.base.accessor.jmi.cci
Class JmiServiceException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by javax.jmi.reflect.JmiException
                  extended by org.openmdx.base.accessor.jmi.cci.JmiServiceException
All Implemented Interfaces:
Serializable, BasicException.Wrapper, MultiLineStringRepresentation

public class JmiServiceException
extends JmiException
implements BasicException.Wrapper

The JmiServiceException is a specialization of the JmiException. It embeds a ServiceExeption and is thrown by the openMDX implementation.

See Also:
Serialized Form

Constructor Summary
JmiServiceException(Throwable cause)
          Constructor
JmiServiceException(Throwable cause, RefObject elementInError)
          Constructor
 
Method Summary
 JmiServiceException appendCause(Throwable cause)
           
 Throwable getCause()
          Returns the cause of an exception.
 BasicException getCause(String exceptionDomain)
          Returns the cause belonging to a specific exception domain.
 int getExceptionCode()
          Retrieves the exception code of this ServiceException.
 String getExceptionDomain()
          Retrieves the exception domain of this ServiceException.
 BasicException getExceptionStack()
          Return a StackedException, this exception object's cause.
 String getMessage()
          Returns the detail message string of this RuntimeServiceException.
protected static BasicException.Parameter[] getParameters(RefObject elementInError)
          Retrieve attributes of the element in error
 ServiceException getServiceException()
          Deprecated. use new
 BasicException getStackedException()
          Deprecated. use getExceptionStack()
 Throwable initCause(Throwable cause)
          Initializes the cause of this throwable to the specified value.
 JmiServiceException log()
          Log the exception at warning level.
 void printStackTrace(PrintStream s)
           
 void printStackTrace(PrintWriter s)
           
 String toString()
          A String consisting of the class of this exception, the exception domain, the exception code, the exception description and the exception stack.
 
Methods inherited from class javax.jmi.reflect.JmiException
getElementInError, getObjectInError
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JmiServiceException

public JmiServiceException(Throwable cause)
Constructor

Parameters:
cause - a BasicException wrapper

JmiServiceException

public JmiServiceException(Throwable cause,
                           RefObject elementInError)
Constructor

Parameters:
cause - a BasicException wrapper
elementInError -
Method Detail

getParameters

protected static BasicException.Parameter[] getParameters(RefObject elementInError)
Retrieve attributes of the element in error

Parameters:
elementInError -
Returns:
some attributes of the element in error

log

public JmiServiceException log()
Log the exception at warning level.

Returns:
this RuntimeServiceException

appendCause

public JmiServiceException appendCause(Throwable cause)

getStackedException

public final BasicException getStackedException()
Deprecated. use getExceptionStack()

Returns:
the BasicException wrapped by this object.

getExceptionStack

public BasicException getExceptionStack()
Return a StackedException, this exception object's cause.

Specified by:
getExceptionStack in interface BasicException.Wrapper
Returns:
the BasicException wrapped by this object.

getExceptionDomain

public String getExceptionDomain()
Retrieves the exception domain of this ServiceException.

Specified by:
getExceptionDomain in interface BasicException.Wrapper
Returns:
the exception domain

getExceptionCode

public int getExceptionCode()
Retrieves the exception code of this ServiceException.

Specified by:
getExceptionCode in interface BasicException.Wrapper
Returns:
the exception code

getCause

public BasicException getCause(String exceptionDomain)
Returns the cause belonging to a specific exception domain.

Specified by:
getCause in interface BasicException.Wrapper
Parameters:
exceptionDomain - the desired exception domain, or null to retrieve the initial cause.
Returns:
Either the cause belonging to a specific exception domain or the initial cause if exceptionDomain is null.

getMessage

public String getMessage()
Returns the detail message string of this RuntimeServiceException.

Specified by:
getMessage in interface BasicException.Wrapper
Overrides:
getMessage in class Throwable
Returns:
the detail message string of this Wrapper exception instance (which may be null).

toString

public String toString()
A String consisting of the class of this exception, the exception domain, the exception code, the exception description and the exception stack.

Overrides:
toString in class Throwable
Returns:
a multiline representation of this exception.

initCause

public Throwable initCause(Throwable cause)
Initializes the cause of this throwable to the specified value. (The cause is the throwable that caused this throwable to get thrown.)

Overrides:
initCause in class Throwable
Parameters:
cause - the cause (which is saved for later retrieval by the getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
Returns:
a reference to this RuntimeServiceException instance.
Throws:
IllegalArgumentException - if cause is this throwable. (A throwable cannot be its own cause.)
IllegalStateException - if the cause is already set.

getCause

public Throwable getCause()
Returns the cause of an exception. The cause actually is the wrapped exception.

Overrides:
getCause in class Throwable
Returns:
Throwable The exception cause.

printStackTrace

public void printStackTrace(PrintStream s)
Overrides:
printStackTrace in class Throwable

printStackTrace

public void printStackTrace(PrintWriter s)
Overrides:
printStackTrace in class Throwable

getServiceException

public ServiceException getServiceException()
Deprecated. use new

Convert this JmiServiceException to a ServiceException



This software is published under the BSD license. Copyright © 2003-2008, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.