001 // Copyright 2004, 2005 The Apache Software Foundation
002 //
003 // Licensed under the Apache License, Version 2.0 (the "License");
004 // you may not use this file except in compliance with the License.
005 // You may obtain a copy of the License at
006 //
007 // http://www.apache.org/licenses/LICENSE-2.0
008 //
009 // Unless required by applicable law or agreed to in writing, software
010 // distributed under the License is distributed on an "AS IS" BASIS,
011 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
012 // See the License for the specific language governing permissions and
013 // limitations under the License.
014
015 package org.apache.tapestry.util.exception;
016
017 import java.io.Serializable;
018
019 /**
020 * A description of an <code>Exception</code>. This is useful when presenting an
021 * exception (in output or on a web page).
022 *
023 * <p>We capture all the information about an exception as
024 * Strings.
025 *
026 * @author Howard Lewis Ship
027 *
028 **/
029
030 public class ExceptionDescription implements Serializable
031 {
032 /**
033 * @since 2.0.4
034 *
035 **/
036
037 private static final long serialVersionUID = -4874930784340781514L;
038
039 private String exceptionClassName;
040 private String message;
041 private ExceptionProperty[] properties;
042 private String[] stackTrace;
043
044 public ExceptionDescription(
045 String exceptionClassName,
046 String message,
047 ExceptionProperty[] properties,
048 String[] stackTrace)
049 {
050 this.exceptionClassName = exceptionClassName;
051 this.message = message;
052 this.properties = properties;
053 this.stackTrace = stackTrace;
054 }
055
056 public String getExceptionClassName()
057 {
058 return exceptionClassName;
059 }
060
061 public String getMessage()
062 {
063 return message;
064 }
065
066 public ExceptionProperty[] getProperties()
067 {
068 return properties;
069 }
070
071 public String[] getStackTrace()
072 {
073 return stackTrace;
074 }
075 }