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.lang3;
018
019 /**
020 * <p>Exception thrown when the Serialization process fails.</p>
021 *
022 * <p>The original error is wrapped within this one.</p>
023 *
024 * <p>#NotThreadSafe# because Throwable is not threadsafe</p>
025 * @author Apache Software Foundation
026 * @since 1.0
027 * @version $Id: SerializationException.java 918836 2010-03-04 03:12:36Z sebb $
028 */
029 public class SerializationException extends RuntimeException {
030
031 /**
032 * Required for serialization support.
033 *
034 * @see java.io.Serializable
035 */
036 private static final long serialVersionUID = 4029025366392702726L;
037
038 /**
039 * <p>Constructs a new <code>SerializationException</code> without specified
040 * detail message.</p>
041 */
042 public SerializationException() {
043 super();
044 }
045
046 /**
047 * <p>Constructs a new <code>SerializationException</code> with specified
048 * detail message.</p>
049 *
050 * @param msg The error message.
051 */
052 public SerializationException(String msg) {
053 super(msg);
054 }
055
056 /**
057 * <p>Constructs a new <code>SerializationException</code> with specified
058 * nested <code>Throwable</code>.</p>
059 *
060 * @param cause The <code>Exception</code> or <code>Error</code>
061 * that caused this exception to be thrown.
062 */
063 public SerializationException(Throwable cause) {
064 super(cause);
065 }
066
067 /**
068 * <p>Constructs a new <code>SerializationException</code> with specified
069 * detail message and nested <code>Throwable</code>.</p>
070 *
071 * @param msg The error message.
072 * @param cause The <code>Exception</code> or <code>Error</code>
073 * that caused this exception to be thrown.
074 */
075 public SerializationException(String msg, Throwable cause) {
076 super(msg, cause);
077 }
078
079 }