1. /*
  2. * @(#)BadBinaryOpValueExpException.java 4.18 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 expression is passed to a method for
  10. * constructing a query. This exception is used internally by JMX
  11. * during the evaluation of a query. User code does not usually see
  12. * it.
  13. *
  14. * @since 1.5
  15. */
  16. public class BadBinaryOpValueExpException extends Exception {
  17. /* Serial version */
  18. private static final long serialVersionUID = 5068475589449021227L;
  19. /**
  20. * @serial the {@link ValueExp} that originated this exception
  21. */
  22. private ValueExp exp;
  23. /**
  24. * Constructs a <CODE>BadBinaryOpValueExpException</CODE> with the specified <CODE>ValueExp</CODE>.
  25. *
  26. * @param exp the expression whose value was inappropriate.
  27. */
  28. public BadBinaryOpValueExpException(ValueExp exp) {
  29. this.exp = exp;
  30. }
  31. /**
  32. * Returns the <CODE>ValueExp</CODE> that originated the exception.
  33. *
  34. * @return the problematic {@link ValueExp}.
  35. */
  36. public ValueExp getExp() {
  37. return exp;
  38. }
  39. /**
  40. * Returns the string representing the object.
  41. */
  42. public String toString() {
  43. return "BadBinaryOpValueExpException: " + exp;
  44. }
  45. }