Path: blob/aarch64-shenandoah-jdk8u272-b10/jaxws/src/share/jaxws_classes/javax/xml/bind/ValidationException.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* a validate operation.30*31* <p>32* The <tt>ValidationEventHandler</tt> can cause this exception to be thrown33* during the validate operations. See34* {@link ValidationEventHandler#handleEvent(ValidationEvent)35* ValidationEventHandler.handleEvent(ValidationEvent)}.36*37* @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul>38* @see JAXBException39* @see Validator40* @since JAXB1.041*/42public class ValidationException extends JAXBException {4344/**45* Construct an ValidationException with the specified detail message. The46* errorCode and linkedException will default to null.47*48* @param message a description of the exception49*/50public ValidationException(String message) {51this( message, null, null );52}5354/**55* Construct an ValidationException with the specified detail message and vendor56* specific errorCode. The linkedException will default to null.57*58* @param message a description of the exception59* @param errorCode a string specifying the vendor specific error code60*/61public ValidationException(String message, String errorCode) {62this( message, errorCode, null );63}6465/**66* Construct an ValidationException with a linkedException. The detail message and67* vendor specific errorCode will default to null.68*69* @param exception the linked exception70*/71public ValidationException(Throwable exception) {72this( null, null, exception );73}7475/**76* Construct an ValidationException with the specified detail message and77* linkedException. The errorCode will default to null.78*79* @param message a description of the exception80* @param exception the linked exception81*/82public ValidationException(String message, Throwable exception) {83this( message, null, exception );84}8586/**87* Construct an ValidationException with the specified detail message, vendor88* specific errorCode, and linkedException.89*90* @param message a description of the exception91* @param errorCode a string specifying the vendor specific error code92* @param exception the linked exception93*/94public ValidationException(String message, String errorCode, Throwable exception) {95super( message, errorCode, exception );96}9798}99100101