You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Dan Wells <da...@byu.edu> on 2003/08/14 17:06:39 UTC
Using ExceptionDescription
Hi all,
I am overriding the default Exception page with a basic page that will
show the exception messages to the user, will allow them to restart the
service, and will hide the stacktrace in a comment block for tech
support to view.
I have a Foreach component looping through the list of
ExceptionDescriptions created by the ExceptionAnalyzer's analyze method
and Insert-ing the message of each ExceptionDescription. To test the
page, I am throwing a RuntimeException with two nested Exceptions.
It works, but the messages from the nested Exceptions don't appear, and
the ExceptionAnalyzer's javadoc said it creates an ExceptionDescription
for each nested exception. Am I missing something?
I am using the BaseEngine and my Error class extends Exception (the
tapestry page).
Here are the simplified, important parts of the relevant code:
Error.html
--------------------------
<span jwcid="@Foreach" source="ognl:exceptions" value="ognl:error">
<b><span jwcid="@Insert" value="ognl:error.message"/></b>
<br>
</span>
Error.java
------------------------
public class Error extends org.apache.tapestry.pages.Exception
{
private ExceptionDescription error;
public ExceptionDescription getError()
{
return error;
}
public void setError(ExceptionDescription ed)
{
error = ed;
}
}
--
Dan Wells <da...@byu.edu>