001    /*
002     * Licensed to the Apache Software Foundation (ASF) under one or more
003     * contributor license agreements.  See the NOTICE file distributed with
004     * this work for additional information regarding copyright ownership.
005     * The ASF licenses this file to You under the Apache License, Version 2.0
006     * (the "License"); you may not use this file except in compliance with
007     * the License.  You may obtain a copy of the License at
008     * 
009     *      http://www.apache.org/licenses/LICENSE-2.0
010     * 
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS,
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     * See the License for the specific language governing permissions and
015     * limitations under the License.
016     */
017    package org.apache.commons.lang;
018    
019    import org.apache.commons.lang.exception.NestableRuntimeException;
020    
021    /**
022     * <p>Exception thrown when the Serialization process fails.</p>
023     *
024     * <p>The original error is wrapped within this one.</p>
025     *
026     * @author Apache Software Foundation
027     * @since 1.0
028     * @version $Id: SerializationException.java 905636 2010-02-02 14:03:32Z niallp $
029     */
030    public class SerializationException extends NestableRuntimeException {
031    
032        /**
033         * Required for serialization support.
034         * 
035         * @see java.io.Serializable
036         */
037        private static final long serialVersionUID = 4029025366392702726L;
038    
039        /**
040         * <p>Constructs a new <code>SerializationException</code> without specified
041         * detail message.</p>
042         */
043        public SerializationException() {
044            super();
045        }
046    
047        /**
048         * <p>Constructs a new <code>SerializationException</code> with specified
049         * detail message.</p>
050         *
051         * @param msg  The error message.
052         */
053        public SerializationException(String msg) {
054            super(msg);
055        }
056    
057        /**
058         * <p>Constructs a new <code>SerializationException</code> with specified
059         * nested <code>Throwable</code>.</p>
060         *
061         * @param cause  The <code>Exception</code> or <code>Error</code>
062         *  that caused this exception to be thrown.
063         */
064        public SerializationException(Throwable cause) {
065            super(cause);
066        }
067    
068        /**
069         * <p>Constructs a new <code>SerializationException</code> with specified
070         * detail message and nested <code>Throwable</code>.</p>
071         *
072         * @param msg    The error message.
073         * @param cause  The <code>Exception</code> or <code>Error</code>
074         *  that caused this exception to be thrown.
075         */
076        public SerializationException(String msg, Throwable cause) {
077            super(msg, cause);
078        }
079    
080    }