1 /** 2 * Redistribution and use of this software and associated documentation ("Software"), with or 3 * without modification, are permitted provided that the following conditions are met: 4 * 5 * 1. Redistributions of source code must retain copyright statements and notices. Redistributions 6 * must also contain a copy of this document. 7 * 8 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of 9 * conditions and the following disclaimer in the documentation and/or other materials provided with 10 * the distribution. 11 * 12 * 3. The name "Exolab" must not be used to endorse or promote products derived from this Software 13 * without prior written permission of Intalio, Inc. For written permission, please contact 14 * info@exolab.org. 15 * 16 * 4. Products derived from this Software may not be called "Exolab" nor may "Exolab" appear in 17 * their names without prior written permission of Intalio, Inc. Exolab is a registered trademark of 18 * Intalio, Inc. 19 * 20 * 5. Due credit should be given to the Exolab Project (http://www.exolab.org/). 21 * 22 * THIS SOFTWARE IS PROVIDED BY INTALIO, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR 23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 24 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTALIO, INC. OR ITS 25 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY 29 * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * 31 * Copyright 1999 (C) Intalio, Inc. All Rights Reserved. 32 * 33 * This file was originally developed by Keith Visco during the course of employment at Intalio Inc. 34 * All portions of this file developed by Keith Visco after Jan 19 2005 are Copyright (C) 2005 Keith 35 * Visco. All Rights Reserved. 36 * 37 * $Id$ 38 */ 39 40 package org.exolab.castor.xml; 41 42 43 /** 44 * An exception that is used to signal marshalling exceptions. 45 * 46 * @author <a href="mailto:keith AT kvisco DOT com">Keith Visco</a> 47 * @version $Revision$ $Date: 2005-12-13 14:58:48 -0700 (Tue, 13 Dec 2005) $ 48 */ 49 public class MarshalException extends XMLException { 50 /** SerialVersionUID */ 51 private static final long serialVersionUID = -1648679783713336948L; 52 53 public static final String BASE_CLASS_OR_VOID_ERR = 54 "The marshaller cannot marshal/unmarshal types of Void.class, " 55 + "Class.class or Object.class"; 56 57 public static final String NON_SERIALIZABLE_ERR = 58 "The marshaller cannot unmarshal non primitive types that " 59 + "do not implement java.io.Serializable"; 60 61 /** 62 * Creates a new {@link MarshalException} with no message or nested exception. 63 **/ 64 public MarshalException() { 65 super(); 66 } 67 68 /** 69 * Creates a new {@link MarshalException} with the given message. 70 * 71 * @param message the message for this exception 72 **/ 73 public MarshalException(String message) { 74 super(message); 75 } 76 77 /** 78 * Creates a new {@link MarshalException} with the given message and an error code. 79 * 80 * @param message the message for this exception 81 * @param errorCode the error code for this exception 82 * 83 * @deprecated 84 **/ 85 public MarshalException(String message, int errorCode) { 86 super(message, errorCode); 87 } 88 89 /** 90 * Creates a new {@link MarshalException} with the given nested exception. 91 * 92 * @param exception the nested exception 93 **/ 94 public MarshalException(Throwable exception) { 95 super(exception); 96 } 97 98 /** 99 * Creates a new {@link MarshalException} with the given message and nested exception. 100 * 101 * @param message the detail message for this exception 102 * @param exception the nested exception 103 **/ 104 public MarshalException(String message, Throwable exception) { 105 super(message, exception); 106 } 107 108 /** 109 * Creates a new {@link MarshalException} with the given message, nested exception, and error 110 * code. 111 * 112 * @param message the detail message for this exception 113 * @param exception the nested exception 114 * @param errorCode the error code for this Exception 115 * 116 * @deprecated 117 **/ 118 public MarshalException(String message, Throwable exception, int errorCode) { 119 super(message, exception, errorCode); 120 } 121 122 }