1. /*
  2. * @(#)BadAttributeValueExpException.java 4.17 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;
  8. /**
  9. * Thrown when an invalid MBean attribute is passed to a query
  10. * constructing method. This exception is used internally by JMX
  11. * during the evaluation of a query. User code does not usually
  12. * see it.
  13. *
  14. * @since 1.5
  15. */
  16. public class BadAttributeValueExpException extends Exception {
  17. /* Serial version */
  18. private static final long serialVersionUID = -3105272988410493376L;
  19. /**
  20. * @serial The attribute value that originated this exception
  21. */
  22. private Object val;
  23. /**
  24. * Constructs an <CODE>BadAttributeValueExpException</CODE> with the specified Object.
  25. *
  26. * @param val the inappropriate value.
  27. */
  28. public BadAttributeValueExpException (Object val) {
  29. this.val = val;
  30. }
  31. /**
  32. * Returns the string representing the object.
  33. */
  34. public String toString() {
  35. return "BadAttributeValueException: " + val;
  36. }
  37. }