Path: blob/aarch64-shenandoah-jdk8u272-b10/jaxws/src/share/jaxws_classes/javax/xml/bind/UnmarshalException.java
38890 views
/*1* Copyright (c) 2003, 2013, 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 javax.xml.bind;2627/**28* This exception indicates that an error has occurred while performing29* an unmarshal operation that prevents the JAXB Provider from completing30* the operation.31*32* <p>33* The <tt>ValidationEventHandler</tt> can cause this exception to be thrown34* during the unmarshal operations. See35* {@link ValidationEventHandler#handleEvent(ValidationEvent)36* ValidationEventHandler.handleEvent(ValidationEvent)}.37*38* @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul>39* @see JAXBException40* @see Unmarshaller41* @see ValidationEventHandler42* @since JAXB1.043*/44public class UnmarshalException extends JAXBException {4546/**47* Construct an UnmarshalException with the specified detail message. The48* errorCode and linkedException will default to null.49*50* @param message a description of the exception51*/52public UnmarshalException( String message ) {53this( message, null, null );54}5556/**57* Construct an UnmarshalException with the specified detail message and vendor58* specific errorCode. The linkedException will default to null.59*60* @param message a description of the exception61* @param errorCode a string specifying the vendor specific error code62*/63public UnmarshalException( String message, String errorCode ) {64this( message, errorCode, null );65}6667/**68* Construct an UnmarshalException with a linkedException. The detail message and69* vendor specific errorCode will default to null.70*71* @param exception the linked exception72*/73public UnmarshalException( Throwable exception ) {74this( null, null, exception );75}7677/**78* Construct an UnmarshalException with the specified detail message and79* linkedException. The errorCode will default to null.80*81* @param message a description of the exception82* @param exception the linked exception83*/84public UnmarshalException( String message, Throwable exception ) {85this( message, null, exception );86}8788/**89* Construct an UnmarshalException with the specified detail message, vendor90* specific errorCode, and linkedException.91*92* @param message a description of the exception93* @param errorCode a string specifying the vendor specific error code94* @param exception the linked exception95*/96public UnmarshalException( String message, String errorCode, Throwable exception ) {97super( message, errorCode, exception );98}99100}101102103