1. /*
  2. * @(#)JMXServerErrorException.java 1.10 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.management.remote;
  8. import java.io.IOException;
  9. // imports for javadoc
  10. import javax.management.MBeanServer;
  11. /**
  12. * Exception thrown as the result of a remote {@link MBeanServer}
  13. * method invocation when an <code>Error</code> is thrown while
  14. * processing the invocation in the remote MBean server. A
  15. * <code>JMXServerErrorException</code> instance contains the original
  16. * <code>Error</code> that occurred as its cause.
  17. *
  18. * @see java.rmi.ServerError
  19. * @since 1.5
  20. * @since.unbundled 1.0
  21. */
  22. public class JMXServerErrorException extends IOException {
  23. private static final long serialVersionUID = 3996732239558744666L;
  24. /**
  25. * Constructs a <code>JMXServerErrorException</code> with the specified
  26. * detail message and nested error.
  27. *
  28. * @param s the detail message.
  29. * @param err the nested error. An instance of this class can be
  30. * constructed where this parameter is null, but the standard
  31. * connectors will never do so.
  32. */
  33. public JMXServerErrorException(String s, Error err) {
  34. super(s);
  35. cause = err;
  36. }
  37. public Throwable getCause() {
  38. return cause;
  39. }
  40. /**
  41. * @serial An {@link Error} that caused this exception to be thrown.
  42. * @see #getCause()
  43. **/
  44. private final Error cause;
  45. }