tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Wells <dan_we...@byu.edu>
Subject Using ExceptionDescription
Date Thu, 14 Aug 2003 15:06:39 GMT
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 <dan_wells@byu.edu>


Mime
View raw message