2 Replies Latest reply: Dec 2, 2007 9:28 AM by Pete Muir RSS

problem with exception handling

John McClain Newbie

I put the following in pages.xml to test exception handling:

.
.<exception>
 <end-conversation/>
 <redirect view-id="/genericErrorPage.xhtml">

 </redirect>
 </exception>

</pages>


Here is genericErrorPage.xhtml
body>
<h:messages
 styleClass="message"
 id="globalMessages" />
</body>


Here is where the exception is thrown in the backing bean:
.
.
@Factory("caseList")
 public List<Tblcase> getCaseList() throws Exception {
 if (true)
 {
 facesMessages.add("TeSTMESSAGE1");
 throw new Exception("test");
 }

facesMessages was @In injected into this statefull session bean
The genericErroPage.xhtml does not come up, instead I get this
SEVERE: Error Rendering View[/caselist.xhtml]
java.lang.RuntimeException: exception invoking: getCaseList
 at or
.
.



Why no erro page?