KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tapestry > util > exception > ExceptionDescription


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

15 package org.apache.tapestry.util.exception;
16
17 import java.io.Serializable JavaDoc;
18
19 /**
20  * A description of an <code>Exception</code>. This is useful when presenting an
21  * exception (in output or on a web page).
22  *
23  * <p>We capture all the information about an exception as
24  * Strings.
25  *
26  * @author Howard Lewis Ship
27  *
28  **/

29
30 public class ExceptionDescription implements Serializable JavaDoc
31 {
32     /**
33      * @since 2.0.4
34      *
35      **/

36
37     private static final long serialVersionUID = -4874930784340781514L;
38
39     private String JavaDoc exceptionClassName;
40     private String JavaDoc message;
41     private ExceptionProperty[] properties;
42     private String JavaDoc[] stackTrace;
43
44     public ExceptionDescription(
45         String JavaDoc exceptionClassName,
46         String JavaDoc message,
47         ExceptionProperty[] properties,
48         String JavaDoc[] stackTrace)
49     {
50         this.exceptionClassName = exceptionClassName;
51         this.message = message;
52         this.properties = properties;
53         this.stackTrace = stackTrace;
54     }
55
56     public String JavaDoc getExceptionClassName()
57     {
58         return exceptionClassName;
59     }
60
61     public String JavaDoc getMessage()
62     {
63         return message;
64     }
65
66     public ExceptionProperty[] getProperties()
67     {
68         return properties;
69     }
70
71     public String JavaDoc[] getStackTrace()
72     {
73         return stackTrace;
74     }
75 }
Popular Tags