-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
8.0.0
Example:
<error-page>
<exception-type>com.text.CustomException</exception-type>
<location>/errorpagebug.zul</location>
</error-page>
From the The error-page Element page (http://books.zkoss.org/wiki/ZK_Configuration_Reference/zk.xml/The_error-page_Element):
It specifies an error page used when an un-caught exception is thrown in updating a ZUML page (e.g., in an event listener). Each page is associated with an exception type, aka, a class deriving from java.lang.Throwable. You can specify multiple error pages, each with a different exception type. When an error occurs, ZK searches the proper error page by examing the exception type one-by-one. If none is found, it will show an alert message at the client by default.
That is not hapening. The CustomException reaches the UiEngineImpl.visualizeErrors method as wrapped in either UiException or OperationException (when the custom exception implements Expectable). The call to Configuration.getErrorPage fails because the CustomException is neither a instance of UiException nor OperationException.
The only way I was able to make the error-page configuration work was by using java.lang.Throwable as the execution type.