View Javadoc

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.lang;
18  
19  import org.apache.commons.lang.exception.NestableRuntimeException;
20  
21  /**
22   * <p>Exception thrown when the Serialization process fails.</p>
23   *
24   * <p>The original error is wrapped within this one.</p>
25   *
26   * @author Stephen Colebourne
27   * @since 1.0
28   * @version $Id: SerializationException.java 437554 2006-08-28 06:21:41Z bayard $
29   */
30  public class SerializationException extends NestableRuntimeException {
31  
32      /**
33       * Required for serialization support.
34       * 
35       * @see java.io.Serializable
36       */
37      private static final long serialVersionUID = 4029025366392702726L;
38  
39      /**
40       * <p>Constructs a new <code>SerializationException</code> without specified
41       * detail message.</p>
42       */
43      public SerializationException() {
44          super();
45      }
46  
47      /**
48       * <p>Constructs a new <code>SerializationException</code> with specified
49       * detail message.</p>
50       *
51       * @param msg  The error message.
52       */
53      public SerializationException(String msg) {
54          super(msg);
55      }
56  
57      /**
58       * <p>Constructs a new <code>SerializationException</code> with specified
59       * nested <code>Throwable</code>.</p>
60       *
61       * @param cause  The <code>Exception</code> or <code>Error</code>
62       *  that caused this exception to be thrown.
63       */
64      public SerializationException(Throwable cause) {
65          super(cause);
66      }
67  
68      /**
69       * <p>Constructs a new <code>SerializationException</code> with specified
70       * detail message and nested <code>Throwable</code>.</p>
71       *
72       * @param msg    The error message.
73       * @param cause  The <code>Exception</code> or <code>Error</code>
74       *  that caused this exception to be thrown.
75       */
76      public SerializationException(String msg, Throwable cause) {
77          super(msg, cause);
78      }
79  
80  }