1. /*
  2. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  3. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  4. */
  5. package javax.jms;
  6. /**
  7. * <P> This exception is thrown when a method is
  8. * invoked at an illegal or inappropriate time or if the provider is
  9. * not in an appropriate state for the requested operation. For example,
  10. * this exception must be thrown if <CODE>Session.commit</CODE> is
  11. * called on a non-transacted session.
  12. *
  13. * @version 26 August 1998
  14. * @author Rahul Sharma
  15. **/
  16. public class IllegalStateException extends JMSException {
  17. /** Constructs an <CODE>IllegalStateException</CODE> with the specified reason
  18. * and error code.
  19. *
  20. * @param reason a description of the exception
  21. * @param errorCode a string specifying the vendor-specific
  22. * error code
  23. *
  24. **/
  25. public
  26. IllegalStateException(String reason, String errorCode) {
  27. super(reason, errorCode);
  28. }
  29. /** Constructs an <CODE>IllegalStateException</CODE> with the specified
  30. * reason. The error code defaults to null.
  31. *
  32. * @param reason a description of the exception
  33. **/
  34. public
  35. IllegalStateException(String reason) {
  36. super(reason);
  37. }
  38. }