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 021 * an exception (in output or on a web page). 022 * <p> 023 * We capture all the information about an exception as Strings. 024 * 025 * @author Howard Lewis Ship 026 */ 027 028 public class ExceptionDescription implements Serializable 029 { 030 031 /** 032 * @since 2.0.4 033 */ 034 035 private static final long serialVersionUID = -4874930784340781514L; 036 037 private String _exceptionClassName; 038 private String _message; 039 private ExceptionProperty[] _properties; 040 private String[] _stackTrace; 041 042 public ExceptionDescription(String exceptionClassName, String message, 043 ExceptionProperty[] properties, String[] stackTrace) 044 { 045 this._exceptionClassName = exceptionClassName; 046 this._message = message; 047 this._properties = properties; 048 this._stackTrace = stackTrace; 049 } 050 051 public String getExceptionClassName() 052 { 053 return _exceptionClassName; 054 } 055 056 public String getMessage() 057 { 058 return _message; 059 } 060 061 public ExceptionProperty[] getProperties() 062 { 063 return _properties; 064 } 065 066 public String[] getStackTrace() 067 { 068 return _stackTrace; 069 } 070 }