Save This Page
Home » openjdk-7 » javax » xml » bind » [javadoc | source]
    1   /*
    2    * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
    3    * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    4    *
    5    * This code is free software; you can redistribute it and/or modify it
    6    * under the terms of the GNU General Public License version 2 only, as
    7    * published by the Free Software Foundation.  Sun designates this
    8    * particular file as subject to the "Classpath" exception as provided
    9    * by Sun in the LICENSE file that accompanied this code.
   10    *
   11    * This code is distributed in the hope that it will be useful, but WITHOUT
   12    * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   13    * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   14    * version 2 for more details (a copy is included in the LICENSE file that
   15    * accompanied this code).
   16    *
   17    * You should have received a copy of the GNU General Public License version
   18    * 2 along with this work; if not, write to the Free Software Foundation,
   19    * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   20    *
   21    * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   22    * CA 95054 USA or visit www.sun.com if you need additional information or
   23    * have any questions.
   24    */
   25   
   26   package javax.xml.bind;
   27   
   28   /**
   29    * This exception indicates that an error has occurred while performing
   30    * a validate operation.
   31    *
   32    * <p>
   33    * The <tt>ValidationEventHandler</tt> can cause this exception to be thrown
   34    * during the validate operations.  See
   35    * {@link ValidationEventHandler#handleEvent(ValidationEvent)
   36    * ValidationEventHandler.handleEvent(ValidationEvent)}.
   37    *
   38    * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul>
   39    * @see JAXBException
   40    * @see Validator
   41    * @since JAXB1.0
   42    */
   43   public class ValidationException extends JAXBException {
   44   
   45       /**
   46        * Construct an ValidationException with the specified detail message.  The
   47        * errorCode and linkedException will default to null.
   48        *
   49        * @param message a description of the exception
   50        */
   51       public ValidationException(String message) {
   52           this( message, null, null );
   53       }
   54   
   55       /**
   56        * Construct an ValidationException with the specified detail message and vendor
   57        * specific errorCode.  The linkedException will default to null.
   58        *
   59        * @param message a description of the exception
   60        * @param errorCode a string specifying the vendor specific error code
   61        */
   62       public ValidationException(String message, String errorCode) {
   63           this( message, errorCode, null );
   64       }
   65   
   66       /**
   67        * Construct an ValidationException with a linkedException.  The detail message and
   68        * vendor specific errorCode will default to null.
   69        *
   70        * @param exception the linked exception
   71        */
   72       public ValidationException(Throwable exception) {
   73           this( null, null, exception );
   74       }
   75   
   76       /**
   77        * Construct an ValidationException with the specified detail message and
   78        * linkedException.  The errorCode will default to null.
   79        *
   80        * @param message a description of the exception
   81        * @param exception the linked exception
   82        */
   83       public ValidationException(String message, Throwable exception) {
   84           this( message, null, exception );
   85       }
   86   
   87       /**
   88        * Construct an ValidationException with the specified detail message, vendor
   89        * specific errorCode, and linkedException.
   90        *
   91        * @param message a description of the exception
   92        * @param errorCode a string specifying the vendor specific error code
   93        * @param exception the linked exception
   94        */
   95       public ValidationException(String message, String errorCode, Throwable exception) {
   96           super( message, errorCode, exception );
   97       }
   98   
   99   }

Save This Page
Home » openjdk-7 » javax » xml » bind » [javadoc | source]