KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > directwebremoting > extend > ServerException


1 /*
2  * Copyright 2005 Joe Walker
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of 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,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.directwebremoting.extend;
17
18 /**
19  * Something has gone wrong when we were doing some conversion.
20  * @author Joe Walker [joe at getahead dot ltd dot uk]
21  */

22 public class ServerException extends Exception JavaDoc
23 {
24     /**
25      * Default ctor
26      */

27     public ServerException()
28     {
29     }
30
31     /**
32      * Construct a MarshallException with a description message and exception
33      * @param message error description
34      */

35     public ServerException(String JavaDoc message)
36     {
37         super(message);
38     }
39
40     /**
41      * Construct a MarshallException with a description message and exception
42      * @param message error description
43      * @param ex error stack trace
44      */

45     public ServerException(String JavaDoc message, Throwable JavaDoc ex)
46     {
47         super(message);
48         this.ex = ex;
49     }
50
51     /**
52      * Construct a MarshallException with an exception
53      * @param ex error stack trace
54      */

55     public ServerException(Throwable JavaDoc ex)
56     {
57         super(ex.getMessage());
58         this.ex = ex;
59     }
60
61     /**
62      * @return The cause of this exception (if any)
63      */

64     public Throwable JavaDoc getCause()
65     {
66         return ex;
67     }
68
69     /**
70      * Stored exception cause
71      */

72     private Throwable JavaDoc ex = null;
73 }
74
Popular Tags