1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17 package org.apache.commons.lang3;
18
19 /**
20 * <p>Exception thrown when the Serialization process fails.</p>
21 *
22 * <p>The original error is wrapped within this one.</p>
23 *
24 * <p>#NotThreadSafe# because Throwable is not thread-safe</p>
25 * @since 1.0
26 * @version $Id: SerializationException.java 1436768 2013-01-22 07:07:42Z ggregory $
27 */
28 public class SerializationException extends RuntimeException {
29
30 /**
31 * Required for serialization support.
32 *
33 * @see java.io.Serializable
34 */
35 private static final long serialVersionUID = 4029025366392702726L;
36
37 /**
38 * <p>Constructs a new {@code SerializationException} without specified
39 * detail message.</p>
40 */
41 public SerializationException() {
42 super();
43 }
44
45 /**
46 * <p>Constructs a new {@code SerializationException} with specified
47 * detail message.</p>
48 *
49 * @param msg The error message.
50 */
51 public SerializationException(final String msg) {
52 super(msg);
53 }
54
55 /**
56 * <p>Constructs a new {@code SerializationException} with specified
57 * nested {@code Throwable}.</p>
58 *
59 * @param cause The {@code Exception} or {@code Error}
60 * that caused this exception to be thrown.
61 */
62 public SerializationException(final Throwable cause) {
63 super(cause);
64 }
65
66 /**
67 * <p>Constructs a new {@code SerializationException} with specified
68 * detail message and nested {@code Throwable}.</p>
69 *
70 * @param msg The error message.
71 * @param cause The {@code Exception} or {@code Error}
72 * that caused this exception to be thrown.
73 */
74 public SerializationException(final String msg, final Throwable cause) {
75 super(msg, cause);
76 }
77
78 }