KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > appfuse > webapp > action > Error


1 package org.appfuse.webapp.action;
2
3 import org.apache.tapestry.pages.Exception;
4
5 /**
6  * A customized exception page; in non-debug mode, it omits displays the main exception display.
7  */

8
9 public abstract class Error extends Exception JavaDoc {
10
11     public abstract String JavaDoc getError();
12     public abstract void setError(String JavaDoc value);
13     
14     public void setException(Throwable JavaDoc value) {
15         super.setException(value);
16
17         String JavaDoc message = value.getMessage();
18
19         if (message == null)
20             message = value.getClass().getName();
21
22         setError(message);
23     }
24 }
Popular Tags