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