This adds the remaining management exceptions in a vain attempt to garner JAPI points... ;)
Changelog:
2006-08-04 Andrew John Hughes <[EMAIL PROTECTED]>
* javax/management/BadAttributeValueExpException.java,
* javax/management/BadStringOperationException.java,
* javax/management/InstanceAlreadyExistsException.java,
* javax/management/InstanceNotFoundException.java,
* javax/management/InvalidApplicationException.java,
* javax/management/MBeanRegistrationException.java,
* javax/management/MalformedObjectNameException.java,
* javax/management/RuntimeErrorException.java,
* javax/management/RuntimeMBeanException.java,
* javax/management/ServiceNotFoundException.java:
New files.
--
Andrew :-)
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }
Index: javax/management/BadAttributeValueExpException.java
===================================================================
RCS file: javax/management/BadAttributeValueExpException.java
diff -N javax/management/BadAttributeValueExpException.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/management/BadAttributeValueExpException.java 4 Aug 2006 18:42:51
-0000
@@ -0,0 +1,91 @@
+/* BadAttributeValueExpException.java -- Thrown by invalid query attributes.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package javax.management;
+
+/**
+ * Thrown when the value of an a attribute passed to a query proves to
+ * be invalid. This exception is only used internally by the Java
+ * management API and is not exposed to user code.
+ *
+ * @author Andrew John Hughes ([EMAIL PROTECTED])
+ * @since 1.5
+ */
+public class BadAttributeValueExpException
+ extends Exception
+{
+
+ /**
+ * Compatible with JDK 1.5
+ */
+ private static final long serialVersionUID = -3105272988410493376L;
+
+ /**
+ * The attribute value that caused the exception.
+ */
+ private Object val;
+
+ /**
+ * Constructs a new <code>BadAttributeValueExpException</code>
+ * using the specified object to represent the invalid value.
+ *
+ * @param val the inappropriate value.
+ */
+ public BadAttributeValueExpException(Object val)
+ {
+ super();
+ this.val = val;
+ }
+
+ /**
+ * Returns a textual representation of this instance. This
+ * is constructed using the class name
+ * (<code>javax.management.BadAttributeValueExpException</code>)
+ * and the invalid value.
+ *
+ * @return a @link{java.lang.String} instance representing
+ * the instance in textual form.
+ */
+ public String toString()
+ {
+ return getClass().getName()
+ + "[val=" + val
+ + "]";
+ }
+
+}
+
Index: javax/management/BadStringOperationException.java
===================================================================
RCS file: javax/management/BadStringOperationException.java
diff -N javax/management/BadStringOperationException.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/management/BadStringOperationException.java 4 Aug 2006 18:42:51
-0000
@@ -0,0 +1,92 @@
+/* BadStringOperationException.java -- Thrown by invalid query attributes.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package javax.management;
+
+/**
+ * Thrown when a string-based operation passed to a query proves to
+ * be invalid. This exception is only used internally by the Java
+ * management API and is not exposed to user code.
+ *
+ * @author Andrew John Hughes ([EMAIL PROTECTED])
+ * @since 1.5
+ */
+public class BadStringOperationException
+ extends Exception
+{
+
+ /**
+ * Compatible with JDK 1.5
+ */
+ private static final long serialVersionUID = 7802201238441662100L;
+
+ /**
+ * The operation that caused the exception.
+ */
+ private String op;
+
+ /**
+ * Constructs a new <code>BadStringOperationException</code>
+ * using the specified object to represent the invalid string
+ * operation.
+ *
+ * @param op the inappropriate string operation.
+ */
+ public BadStringOperationException(String op)
+ {
+ super();
+ this.op = op;
+ }
+
+ /**
+ * Returns a textual representation of this instance. This
+ * is constructed using the class name
+ * (<code>javax.management.BadStringOperationException</code>)
+ * and the invalid string operation.
+ *
+ * @return a @link{java.lang.String} instance representing
+ * the instance in textual form.
+ */
+ public String toString()
+ {
+ return getClass().getName()
+ + "[op=" + op
+ + "]";
+ }
+
+}
+
Index: javax/management/InstanceAlreadyExistsException.java
===================================================================
RCS file: javax/management/InstanceAlreadyExistsException.java
diff -N javax/management/InstanceAlreadyExistsException.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/management/InstanceAlreadyExistsException.java 4 Aug 2006
18:42:51 -0000
@@ -0,0 +1,76 @@
+/* InstanceAlreadyExistsException.java -- Thrown by invalid values.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package javax.management;
+
+/**
+ * Thrown when an attempt to register a bean is made, and
+ * the bean is already registered.
+ *
+ * @author Andrew John Hughes ([EMAIL PROTECTED])
+ * @since 1.5
+ */
+public class InstanceAlreadyExistsException
+ extends OperationsException
+{
+
+ /**
+ * Compatible with JDK 1.5
+ */
+ private static final long serialVersionUID = 8893743928912733931L;
+
+ /**
+ * Constructs a new <code>InstanceAlreadyExistsException</code>.
+ */
+ public InstanceAlreadyExistsException()
+ {
+ super();
+ }
+
+ /**
+ * Constructs a new <code>InstanceAlreadyExistsException</code>
+ * with the specified message.
+ *
+ * @param message the error message to give to the user.
+ */
+ public InstanceAlreadyExistsException(String message)
+ {
+ super(message);
+ }
+
+}
+
Index: javax/management/InstanceNotFoundException.java
===================================================================
RCS file: javax/management/InstanceNotFoundException.java
diff -N javax/management/InstanceNotFoundException.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/management/InstanceNotFoundException.java 4 Aug 2006 18:42:51
-0000
@@ -0,0 +1,76 @@
+/* InstanceNotFoundException.java -- Thrown by invalid values.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package javax.management;
+
+/**
+ * Thrown when an attempt to locate a bean is made, and
+ * the bean does not exist in the repository.
+ *
+ * @author Andrew John Hughes ([EMAIL PROTECTED])
+ * @since 1.5
+ */
+public class InstanceNotFoundException
+ extends OperationsException
+{
+
+ /**
+ * Compatible with JDK 1.5
+ */
+ private static final long serialVersionUID = -882579438394773049L;
+
+ /**
+ * Constructs a new <code>InstanceNotFoundException</code>.
+ */
+ public InstanceNotFoundException()
+ {
+ super();
+ }
+
+ /**
+ * Constructs a new <code>InstanceNotFoundException</code>
+ * with the specified message.
+ *
+ * @param message the error message to give to the user.
+ */
+ public InstanceNotFoundException(String message)
+ {
+ super(message);
+ }
+
+}
+
Index: javax/management/InvalidApplicationException.java
===================================================================
RCS file: javax/management/InvalidApplicationException.java
diff -N javax/management/InvalidApplicationException.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/management/InvalidApplicationException.java 4 Aug 2006 18:42:51
-0000
@@ -0,0 +1,92 @@
+/* InvalidApplicationException.java -- Thrown by invalid query attributes.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package javax.management;
+
+/**
+ * Thrown when a query or attribute is applied to a management bean
+ * which is of the wrong class. This exception is only used
+ * internally by the Java management API and is not exposed to user
+ * code.
+ *
+ * @author Andrew John Hughes ([EMAIL PROTECTED])
+ * @since 1.5
+ */
+public class InvalidApplicationException
+ extends Exception
+{
+
+ /**
+ * Compatible with JDK 1.5
+ */
+ private static final long serialVersionUID = -3048022274675537269L;
+
+ /**
+ * The attribute value that caused the exception.
+ */
+ private Object val;
+
+ /**
+ * Constructs a new <code>InvalidApplicationException</code>
+ * using the specified object to represent the invalid value.
+ *
+ * @param val the inappropriate expression.
+ */
+ public InvalidApplicationException(Object val)
+ {
+ super();
+ this.val = val;
+ }
+
+ /**
+ * Returns a textual representation of this instance. This
+ * is constructed using the class name
+ * (<code>javax.management.InvalidApplicationException</code>)
+ * and the invalid expression.
+ *
+ * @return a @link{java.lang.String} instance representing
+ * the instance in textual form.
+ */
+ public String toString()
+ {
+ return getClass().getName()
+ + "[val=" + val
+ + "]";
+ }
+
+}
+
Index: javax/management/MBeanRegistrationException.java
===================================================================
RCS file: javax/management/MBeanRegistrationException.java
diff -N javax/management/MBeanRegistrationException.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/management/MBeanRegistrationException.java 4 Aug 2006 18:42:51
-0000
@@ -0,0 +1,84 @@
+/* MBeanRegistrationException.java -- A bean registration exception.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package javax.management;
+
+/**
+ * Represents an arbitrary exception thrown during registration of a
+ * management bean. When registering a bean causes an exception to be
+ * thrown, the resulting exception is wrapped inside an [EMAIL PROTECTED]
+ * MBeanRegistrationException}. Calling [EMAIL PROTECTED]
getTargetException()}
+ * will return the wrapped exception.
+ *
+ * @author Andrew John Hughes ([EMAIL PROTECTED])
+ * @since 1.5
+ */
+public class MBeanRegistrationException
+ extends MBeanException
+{
+
+ /**
+ * Compatible with JDK 1.5
+ */
+ private static final long serialVersionUID = 4482382455277067805L;
+
+ /**
+ * Constructs a new <code>MBeanRegistrationException</code> wrapping
+ * the specified exception.
+ *
+ * @param e the exception to be wrapped.
+ */
+ public MBeanRegistrationException(Exception e)
+ {
+ super(e);
+ }
+
+ /**
+ * Constructs a new <code>MBeanRegistrationException</code> wrapping
+ * the specified exception and using the supplied message.
+ *
+ * @param e the exception to be wrapped.
+ * @param message the error message to give to the user.
+ */
+ public MBeanRegistrationException(Exception e, String message)
+ {
+ super(e, message);
+ }
+
+
+}
+
Index: javax/management/MalformedObjectNameException.java
===================================================================
RCS file: javax/management/MalformedObjectNameException.java
diff -N javax/management/MalformedObjectNameException.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/management/MalformedObjectNameException.java 4 Aug 2006 18:42:51
-0000
@@ -0,0 +1,76 @@
+/* MalformedObjectNameException.java -- Thrown by invalid values.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package javax.management;
+
+/**
+ * Thrown when a string used as an [EMAIL PROTECTED] ObjectName}
+ * is invalid.
+ *
+ * @author Andrew John Hughes ([EMAIL PROTECTED])
+ * @since 1.5
+ */
+public class MalformedObjectNameException
+ extends OperationsException
+{
+
+ /**
+ * Compatible with JDK 1.5
+ */
+ private static final long serialVersionUID = -572689714442915824L;
+
+ /**
+ * Constructs a new <code>MalformedObjectNameException</code>.
+ */
+ public MalformedObjectNameException()
+ {
+ super();
+ }
+
+ /**
+ * Constructs a new <code>MalformedObjectNameException</code>
+ * with the specified message.
+ *
+ * @param message the error message to give to the user.
+ */
+ public MalformedObjectNameException(String message)
+ {
+ super(message);
+ }
+
+}
+
Index: javax/management/RuntimeErrorException.java
===================================================================
RCS file: javax/management/RuntimeErrorException.java
diff -N javax/management/RuntimeErrorException.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/management/RuntimeErrorException.java 4 Aug 2006 18:42:51 -0000
@@ -0,0 +1,115 @@
+/* RuntimeErrorException.java -- A user-defined management error.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package javax.management;
+
+/**
+ * Represents an arbitrary error thrown by a management
+ * bean. When a management bean executes code that causes
+ * an error to be thrown, the resulting error is
+ * wrapped inside an [EMAIL PROTECTED] RuntimeErrorException}. Calling
+ * [EMAIL PROTECTED] getTargetError()} will return the wrapped
+ * exception.
+ *
+ * @author Andrew John Hughes ([EMAIL PROTECTED])
+ * @since 1.5
+ */
+public class RuntimeErrorException
+ extends JMRuntimeException
+{
+
+ /**
+ * Compatible with JDK 1.5
+ */
+ private static final long serialVersionUID = 704338937753949796L;
+
+ /**
+ * The target error.
+ *
+ * @serial the target error.
+ */
+ private Error error;
+
+ /**
+ * Constructs a new <code>RuntimeErrorException</code> wrapping
+ * the specified error.
+ *
+ * @param e the error to be wrapped.
+ */
+ public RuntimeErrorException(Error e)
+ {
+ super();
+ error = e;
+ }
+
+ /**
+ * Constructs a new <code>RuntimeErrorException</code> wrapping
+ * the specified error and using the supplied message.
+ *
+ * @param e the error to be wrapped.
+ * @param message the error message to give to the user.
+ */
+ public RuntimeErrorException(Error e, String message)
+ {
+ super(message);
+ error = e;
+ }
+
+ /**
+ * Returns the true cause of this error, the wrapped
+ * error.
+ *
+ * @return the wrapped error.
+ */
+ public Throwable getCause()
+ {
+ return error;
+ }
+
+ /**
+ * Returns the true cause of this error, the wrapped
+ * error.
+ *
+ * @return the wrapped error.
+ */
+ public Error getTargetError()
+ {
+ return error;
+ }
+
+}
+
Index: javax/management/RuntimeMBeanException.java
===================================================================
RCS file: javax/management/RuntimeMBeanException.java
diff -N javax/management/RuntimeMBeanException.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/management/RuntimeMBeanException.java 4 Aug 2006 18:42:51 -0000
@@ -0,0 +1,114 @@
+/* RuntimeMBeanException.java -- A user-defined management exception.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package javax.management;
+
+/**
+ * Represents an arbitrary runtime exception thrown by a management
+ * bean. When a management bean executes code that causes a runtime
+ * exception to be thrown, the resulting exception is wrapped inside a
+ * [EMAIL PROTECTED] RuntimeMBeanException}. Calling [EMAIL PROTECTED]
+ * getTargetException()} will return the wrapped exception.
+ *
+ * @author Andrew John Hughes ([EMAIL PROTECTED])
+ * @since 1.5
+ */
+public class RuntimeMBeanException
+ extends JMRuntimeException
+{
+
+ /**
+ * Compatible with JDK 1.5
+ */
+ private static final long serialVersionUID = 5274912751982730171L;
+
+ /**
+ * The target exception.
+ *
+ * @serial the target exception.
+ */
+ private RuntimeException runtimeException;
+
+ /**
+ * Constructs a new <code>RuntimeMBeanException</code> wrapping
+ * the specified exception.
+ *
+ * @param e the exception to be wrapped.
+ */
+ public RuntimeMBeanException(RuntimeException e)
+ {
+ super();
+ runtimeException = e;
+ }
+
+ /**
+ * Constructs a new <code>RuntimeMBeanException</code> wrapping
+ * the specified exception and using the supplied message.
+ *
+ * @param e the exception to be wrapped.
+ * @param message the error message to give to the user.
+ */
+ public RuntimeMBeanException(RuntimeException e, String message)
+ {
+ super(message);
+ runtimeException = e;
+ }
+
+ /**
+ * Returns the true cause of this exception, the wrapped runtime
+ * exception.
+ *
+ * @return the wrapped exception.
+ */
+ public Throwable getCause()
+ {
+ return runtimeException;
+ }
+
+ /**
+ * Returns the true cause of this exception, the wrapped runtime
+ * exception.
+ *
+ * @return the wrapped exception.
+ */
+ public RuntimeException getTargetException()
+ {
+ return runtimeException;
+ }
+
+}
+
Index: javax/management/ServiceNotFoundException.java
===================================================================
RCS file: javax/management/ServiceNotFoundException.java
diff -N javax/management/ServiceNotFoundException.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/management/ServiceNotFoundException.java 4 Aug 2006 18:42:51
-0000
@@ -0,0 +1,75 @@
+/* ServiceNotFoundException.java -- Thrown by invalid values.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package javax.management;
+
+/**
+ * Thrown when a requested service is unsupported.
+ *
+ * @author Andrew John Hughes ([EMAIL PROTECTED])
+ * @since 1.5
+ */
+public class ServiceNotFoundException
+ extends OperationsException
+{
+
+ /**
+ * Compatible with JDK 1.5
+ */
+ private static final long serialVersionUID = -3990675661956646827L;
+
+ /**
+ * Constructs a new <code>ServiceNotFoundException</code>.
+ */
+ public ServiceNotFoundException()
+ {
+ super();
+ }
+
+ /**
+ * Constructs a new <code>ServiceNotFoundException</code>
+ * with the specified message.
+ *
+ * @param message the error message to give to the user.
+ */
+ public ServiceNotFoundException(String message)
+ {
+ super(message);
+ }
+
+}
+
signature.asc
Description: Digital signature
