001 /* 002 * $Id: ValidationException.java,v 1.3 2002/11/11 18:58:21 ryans Exp $ 003 * 004 * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved. 005 * 006 * This software is the proprietary information of Sun Microsystems, Inc. 007 * Use is subject to license terms. 008 * 009 */ 010 011 package javax.xml.bind; 012 013 /** 014 * This exception indicates that an error has occured while performing 015 * a validate operation. 016 * 017 * <p> 018 * The <tt>ValidationEventHandler</tt> can cause this exception to be thrown 019 * during the validate operations. See 020 * {@link ValidationEventHandler#handleEvent(ValidationEvent) 021 * ValidationEventHandler.handleEvent(ValidationEvent)}. 022 * 023 * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul> 024 * @version $Revision: 1.3 $ 025 * @see JAXBException 026 * @see Validator 027 * @since JAXB1.0 028 */ 029 public class ValidationException extends JAXBException { 030 031 /** 032 * Construct an ValidationException with the specified detail message. The 033 * errorCode and linkedException will default to null. 034 * 035 * @param message a description of the exception 036 */ 037 public ValidationException(String message) { 038 this( message, null, null ); 039 } 040 041 /** 042 * Construct an ValidationException with the specified detail message and vendor 043 * specific errorCode. The linkedException will default to null. 044 * 045 * @param message a description of the exception 046 * @param errorCode a string specifying the vendor specific error code 047 */ 048 public ValidationException(String message, String errorCode) { 049 this( message, errorCode, null ); 050 } 051 052 /** 053 * Construct an ValidationException with a linkedException. The detail message and 054 * vendor specific errorCode will default to null. 055 * 056 * @param exception the linked exception 057 */ 058 public ValidationException(Throwable exception) { 059 this( null, null, exception ); 060 } 061 062 /** 063 * Construct an ValidationException with the specified detail message and 064 * linkedException. The errorCode will default to null. 065 * 066 * @param message a description of the exception 067 * @param exception the linked exception 068 */ 069 public ValidationException(String message, Throwable exception) { 070 this( message, null, exception ); 071 } 072 073 /** 074 * Construct an ValidationException with the specified detail message, vendor 075 * specific errorCode, and linkedException. 076 * 077 * @param message a description of the exception 078 * @param errorCode a string specifying the vendor specific error code 079 * @param exception the linked exception 080 */ 081 public ValidationException(String message, String errorCode, Throwable exception) { 082 super( message, errorCode, exception ); 083 } 084 085 }