/*
 * $Header$
 *
 * Copyright (c) OSGi Alliance (2006). All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package info.dmtree;

/**
 * Unchecked illegal state exception. This class is used in DMT because 
 * java.lang.IllegalStateException does not exists in CLDC.
 * 
 * @version $Revision$
 */
public class DmtIllegalStateException extends RuntimeException {
	private static final long	serialVersionUID	= 2015244852018469700L;

	/**
	 * Create an instance of the exception with no message.
	 */
	public DmtIllegalStateException() {
		super();
	}

	/**
	 * Create an instance of the exception with the specific message.
	 * 
	 * @param message The reason for the exception.
	 */
	public DmtIllegalStateException(String message) {
		super(message);
	}
}

@@ -784,17 +784,16 @@
 ot exist
-s
  in CLDC
@@ -794,16 +794,16 @@
 n CLDC.%0A
+
  * %0A * @
@@ -959,16 +959,81 @@
 9700L;%0A%0A
+%09/**%0A%09 * Nested exception.%0A%09 */%0A%09private final Throwable%09cause;%0A%0A
 %09/**%0A%09 *
@@ -1139,16 +1139,32 @@
 uper();%0A
+%09%09cause = null;%0A
 %09%7D%0A%0A%09/**
@@ -1337,24 +1337,24 @@
  message) %7B%0A
-
 %09%09super(mess
@@ -1359,13 +1359,692 @@
 ssage);%0A
+%09%09cause = null;%0A%09%7D%0A%0A%09/**%0A%09 * Create an instance of the exception with no message.%0A%09 */%0A%09public DmtIllegalStateException(Throwable t) %7B%0A%09%09super();%0A%09%09cause = t;%0A%09%7D%0A%0A%09/**%0A%09 * Create an instance of the exception with the specific message.%0A%09 * %0A%09 * @param message The reason for the exception.%0A%09 */%0A%09public DmtIllegalStateException(String message, Throwable t) %7B%0A%09%09super(message);%0A%09%09cause = t;%0A%09%7D%0A%0A%09/**%0A%09 * Returns the cause of this exception or %3Ccode%3Enull%3C/code%3E if no cause%0A%09 * was specified when this exception was created.%0A%09 * %0A%09 * @return The cause of this exception or %3Ccode%3Enull%3C/code%3E if no cause%0A%09 *         was specified.%0A%09 */%0A%09public Throwable getCause() %7B%0A%09%09return cause;%0A
 %09%7D%0A%7D%0A

add exception chaining