Path: blob/aarch64-shenandoah-jdk8u272-b10/jaxws/src/share/jaxws_classes/javax/xml/bind/PropertyException.java
38890 views
/*1* Copyright (c) 2004, 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;26272829/**30* This exception indicates that an error was encountered while getting or31* setting a property.32*33* @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>34* @see JAXBContext35* @see Validator36* @see Unmarshaller37* @since JAXB1.038*/39public class PropertyException extends JAXBException {4041/**42* Construct a PropertyException with the specified detail message. The43* errorCode and linkedException will default to null.44*45* @param message a description of the exception46*/47public PropertyException(String message) {48super(message);49}5051/**52* Construct a PropertyException with the specified detail message and53* vendor specific errorCode. The linkedException will default to null.54*55* @param message a description of the exception56* @param errorCode a string specifying the vendor specific error code57*/58public PropertyException(String message, String errorCode) {59super(message, errorCode);60}6162/**63* Construct a PropertyException with a linkedException. The detail64* message and vendor specific errorCode will default to null.65*66* @param exception the linked exception67*/68public PropertyException(Throwable exception) {69super(exception);70}7172/**73* Construct a PropertyException with the specified detail message and74* linkedException. The errorCode will default to null.75*76* @param message a description of the exception77* @param exception the linked exception78*/79public PropertyException(String message, Throwable exception) {80super(message, exception);81}8283/**84* Construct a PropertyException with the specified detail message, vendor85* specific errorCode, and linkedException.86*87* @param message a description of the exception88* @param errorCode a string specifying the vendor specific error code89* @param exception the linked exception90*/91public PropertyException(92String message,93String errorCode,94Throwable exception) {95super(message, errorCode, exception);96}9798/**99* Construct a PropertyException whose message field is set based on the100* name of the property and value.toString().101*102* @param name the name of the property related to this exception103* @param value the value of the property related to this exception104*/105public PropertyException(String name, Object value) {106super( Messages.format( Messages.NAME_VALUE,107name,108value.toString() ) );109}110111112}113114115