/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @author IBM Corp.
*
* Copyright IBM Corp. 1999-2000. All rights reserved.
*/
/**
* This exception is thrown when an XML formatted string is being parsed into ModelMBean objects
* or when XML formatted strings are being created from ModelMBean objects.
*
* It is also used to wrapper exceptions from XML parsers that may be used.
*
* <p>The <b>serialVersionUID</b> of this class is <code>3176664577895105181L</code>.
*
* @since 1.5
*/
public class XMLParseException
extends Exception
{
// Serialization compatibility stuff:
// Two serial forms are supported in this class. The selected form depends
// on system property "jmx.serial.form":
// - "1.0" for JMX 1.0
// - any other value for JMX 1.1 and higher
//
// Serial version for old serial form
//
// Serial version for new serial form
//
// Serializable fields in old serial form
{
};
//
// Serializable fields in new serial form
//
// Actual serial version and serial form
private static final long serialVersionUID;
private static boolean compat = false;
static {
try {
} catch (Exception e) {
// OK: No compat with 1.0
}
if (compat) {
} else {
}
}
//
// END Serialization compatibility stuff
/**
* Default constructor .
*/
public XMLParseException ()
{
super("XML Parse Exception.");
}
/**
* Constructor taking a string.
*
* @param s the detail message.
*/
{
super("XML Parse Exception: " + s);
}
/**
* Constructor taking a string and an exception.
*
* @param e the nested exception.
* @param s the detail message.
*/
{
}
/**
* Deserializes an {@link XMLParseException} from an {@link ObjectInputStream}.
*/
throws IOException, ClassNotFoundException {
// New serial form ignores extra field "msgStr"
}
/**
* Serializes an {@link XMLParseException} to an {@link ObjectOutputStream}.
*/
throws IOException {
if (compat)
{
// Serializes this instance in the old serial form
//
out.writeFields();
}
else
{
// Serializes this instance in the new serial form
//
}
}
}