summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/java/lang/IllegalStateException.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/java/lang/IllegalStateException.java')
-rw-r--r--libjava/classpath/java/lang/IllegalStateException.java57
1 files changed, 56 insertions, 1 deletions
diff --git a/libjava/classpath/java/lang/IllegalStateException.java b/libjava/classpath/java/lang/IllegalStateException.java
index 5c2bbad37a2..6b4e5f8428a 100644
--- a/libjava/classpath/java/lang/IllegalStateException.java
+++ b/libjava/classpath/java/lang/IllegalStateException.java
@@ -51,8 +51,9 @@ package java.lang;
*
* @author Brian Jones
* @author Warren Levy (warrenl@cygnus.com)
+ * @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.1
- * @status updated to 1.4
+ * @status updated to 1.5
*/
public class IllegalStateException extends RuntimeException
{
@@ -77,4 +78,58 @@ public class IllegalStateException extends RuntimeException
{
super(s);
}
+
+ /**
+ * <p>
+ * Constructs a <code>IllegalStateException</code> using
+ * the specified error message, which should give further details
+ * as to the reason for this exception. The specified cause
+ * <code>Throwable</code> may be used to provide additional history,
+ * with regards to the root of the problem. It is perfectly valid
+ * for this to be null, if the cause of the problem is unknown.
+ * </p>
+ * <p>
+ * <strong>Note</strong>: the detail message from the cause is not
+ * automatically incorporated into the resulting detail message of
+ * this exception.
+ * </p>
+ *
+ * @param message the detail message, which should give the reason for
+ * this exception being thrown.
+ * @param cause the cause of this exception, or null if the cause
+ * is unknown.
+ * @since 1.5
+ */
+ public IllegalStateException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ /**
+ * <p>
+ * Constructs a <code>IllegalStateException</code> using
+ * the specified cause <code>Throwable</code>, which may be used
+ * to provide additional history, with regards to the root of the
+ * problem. It is perfectly valid for this to be null, if the
+ * cause of the problem is unknown.
+ * </p>
+ * <p>
+ * The detail message is automatically constructed from the detail
+ * message of the supplied causal exception. If the cause is null,
+ * then the detail message will also be null. Otherwise, the detail
+ * message of this exception will be that of the causal exception.
+ * This makes this constructor very useful for simply wrapping another
+ * exception.
+ * </p>
+ *
+ * @param cause the cause of this exception, or null if the cause
+ * is unknown.
+ * @since 1.5
+ */
+ public IllegalStateException(Throwable cause)
+ {
+ super(cause);
+ }
+
}
+
OpenPOWER on IntegriCloud