KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > google > gwt > user > client > rpc > SerializableException


1 /*
2  * Copyright 2006 Google Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5  * use this file except in compliance with the License. You may obtain a copy of
6  * the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13  * License for the specific language governing permissions and limitations under
14  * the License.
15  */

16 package com.google.gwt.user.client.rpc;
17
18 /**
19  * Superclass for exceptions thrown from RPC methods (those appearing in
20  * interfaces derived from {@link RemoteService}).
21  */

22 public class SerializableException extends Exception JavaDoc implements IsSerializable {
23
24   private String JavaDoc msg;
25
26   /**
27    * The default constructor. This constructor is used implicitly during
28    * serialization or when constructing subclasses.
29    */

30   public SerializableException() {
31   }
32
33   /**
34    * Constructs a serializable exception with the specified message. This
35    * constructor is most often called by subclass constructors.
36    */

37   public SerializableException(String JavaDoc msg) {
38     this.msg = msg;
39   }
40
41   /**
42    * Exception chaining is not currently supported for serialized exceptions.
43    *
44    * @return always <code>null</code>
45    */

46   public Throwable JavaDoc getCause() {
47     return null;
48   }
49
50   public String JavaDoc getMessage() {
51     return msg;
52   }
53
54   /**
55    * No effect; exception chaining is not currently supported for serialized
56    * exceptions.
57    */

58   public Throwable JavaDoc initCause(Throwable JavaDoc cause) {
59     // nothing
60
return null;
61   }
62 }
63
Popular Tags