001 /* 002 * $Id: UnmarshalException.java,v 1.6 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 * an unmarshal operation that prevents the JAXB Provider from completing 016 * the operation. 017 * 018 * <p> 019 * The <tt>ValidationEventHandler</tt> can cause this exception to be thrown 020 * during the unmarshal operations. See 021 * {@link ValidationEventHandler#handleEvent(ValidationEvent) 022 * ValidationEventHandler.handleEvent(ValidationEvent)}. 023 * 024 * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul> 025 * @version $Revision: 1.6 $ 026 * @see JAXBException 027 * @see Unmarshaller 028 * @see ValidationEventHandler 029 * @since JAXB1.0 030 */ 031 public class UnmarshalException extends JAXBException { 032 033 /** 034 * Construct an UnmarshalException with the specified detail message. The 035 * errorCode and linkedException will default to null. 036 * 037 * @param message a description of the exception 038 */ 039 public UnmarshalException( String message ) { 040 this( message, null, null ); 041 } 042 043 /** 044 * Construct an UnmarshalException with the specified detail message and vendor 045 * specific errorCode. The linkedException will default to null. 046 * 047 * @param message a description of the exception 048 * @param errorCode a string specifying the vendor specific error code 049 */ 050 public UnmarshalException( String message, String errorCode ) { 051 this( message, errorCode, null ); 052 } 053 054 /** 055 * Construct an UnmarshalException with a linkedException. The detail message and 056 * vendor specific errorCode will default to null. 057 * 058 * @param exception the linked exception 059 */ 060 public UnmarshalException( Throwable exception ) { 061 this( null, null, exception ); 062 } 063 064 /** 065 * Construct an UnmarshalException with the specified detail message and 066 * linkedException. The errorCode will default to null. 067 * 068 * @param message a description of the exception 069 * @param exception the linked exception 070 */ 071 public UnmarshalException( String message, Throwable exception ) { 072 this( message, null, exception ); 073 } 074 075 /** 076 * Construct an UnmarshalException with the specified detail message, vendor 077 * specific errorCode, and linkedException. 078 * 079 * @param message a description of the exception 080 * @param errorCode a string specifying the vendor specific error code 081 * @param exception the linked exception 082 */ 083 public UnmarshalException( String message, String errorCode, Throwable exception ) { 084 super( message, errorCode, exception ); 085 } 086 087 } 088 089