Path: blob/master/src/java.base/share/classes/jdk/internal/util/xml/XMLStreamException.java
41161 views
/*1* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package jdk.internal.util.xml;2627/**28* A copy of the StAX XMLStreamException without Location support29*30* The base exception for unexpected processing errors. This Exception31* class is used to report well-formedness errors as well as unexpected32* processing conditions.33* @version 1.034* @author Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.35* @since 1.636*/3738public class XMLStreamException extends Exception {39@java.io.Serial40private static final long serialVersionUID = 1L;414243protected Throwable nested;4445/**46* Default constructor47*/48public XMLStreamException() {49super();50}5152/**53* Construct an exception with the associated message.54*55* @param msg the message to report56*/57public XMLStreamException(String msg) {58super(msg);59}6061/**62* Construct an exception with the associated exception63*64* @param th a nested exception65*/66public XMLStreamException(Throwable th) {67super(th);68nested = th;69}7071/**72* Construct an exception with the associated message and exception73*74* @param th a nested exception75* @param msg the message to report76*/77public XMLStreamException(String msg, Throwable th) {78super(msg, th);79nested = th;80}8182/**83* Gets the nested exception.84*85* @return Nested exception86*/87public Throwable getNestedException() {88return nested;89}90}919293