javax.management
Class MBeanException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by javax.management.JMException
              extended by javax.management.MBeanException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MBeanRegistrationException

public class MBeanException
extends JMException

A wrapper for exceptions thrown by MBeans.

Version:
$Revision: 1.11.6.2 $

Revisions:

20020313 Juha Lindfors:

20020710 Adrian Brock:

Author:
Juha Lindfors, Adrian Brock
See Also:
Serialized Form

Constructor Summary
MBeanException(Exception exception)
          Construct a new MBeanException from a given exception.
MBeanException(Exception exception, String message)
          Construct a new MBeanException from a given exception and message.
 
Method Summary
 Throwable getCause()
          Retrieves the wrapped exception.
 Exception getTargetException()
          Retrieves the wrapped exception.
 String toString()
          Returns a string representation of this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MBeanException

public MBeanException(Exception exception)
Construct a new MBeanException from a given exception.

Parameters:
exception - the exception to wrap.

MBeanException

public MBeanException(Exception exception,
                      String message)
Construct a new MBeanException from a given exception and message.

Parameters:
e - the exception to wrap.
message - the specified message.
Method Detail

getTargetException

public Exception getTargetException()
Retrieves the wrapped exception.

Returns:
the wrapped exception.

getCause

public Throwable getCause()
Retrieves the wrapped exception.

Overrides:
getCause in class Throwable
Returns:
the wrapped exception.

toString

public String toString()
Returns a string representation of this exception. The returned string contains this exception name, message and a string representation of the target exception if it has been set.

Overrides:
toString in class Throwable
Returns:
string representation of this exception


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.