summaryrefslogtreecommitdiff
path: root/libjava/classpath/java/lang/UnsupportedOperationException.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/java/lang/UnsupportedOperationException.java')
-rw-r--r--libjava/classpath/java/lang/UnsupportedOperationException.java56
1 files changed, 55 insertions, 1 deletions
diff --git a/libjava/classpath/java/lang/UnsupportedOperationException.java b/libjava/classpath/java/lang/UnsupportedOperationException.java
index 0387d0ee29d..e691cc7c9ec 100644
--- a/libjava/classpath/java/lang/UnsupportedOperationException.java
+++ b/libjava/classpath/java/lang/UnsupportedOperationException.java
@@ -44,8 +44,9 @@ package java.lang;
* requested of it that it does not support.
*
* @author Warren Levy (warrenl@cygnus.com)
+ * @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.2
- * @status updated to 1.4
+ * @status updated to 1.5
*/
public class UnsupportedOperationException extends RuntimeException
{
@@ -70,4 +71,57 @@ public class UnsupportedOperationException extends RuntimeException
{
super(s);
}
+
+ /**
+ * <p>
+ * Constructs a <code>UnsupportedOperationException</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 UnsupportedOperationException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ /**
+ * <p>
+ * Constructs a <code>UnsupportedOperationException</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 UnsupportedOperationException(Throwable cause)
+ {
+ super(cause);
+ }
+
}