hello,
I have a backing bean with a @create method, like this :
public class MyBean { @create public void init() throws BusinessException { // Some stuff throwing BusinessException here } public void anotherMethod() throws BusinessException { // Some stuff throwing BusinessException here } }
And in page.xml I have something like this :
<exception class="foo.bar.BusinessException" log-level="error"> <redirect view-id="/error.xhtml"> <message severity="error"> #{org.jboss.seam.handledException.message} </message> </redirect> </exception>
It work fine if the exception BusinessException is thrown into anotherMethod. But not in the @create annoted method because the exception is wrapped into a RuntimeException and a InstantiationException. So the exception is not handle as i want, and there is no redirect...
How should I do to handle exception in a @ create method ?
Can't you use <exception class="foo.bar.InstantiationException"> to handle it?
But I guess you want to handle the BusinessException specifically, not the wrapper exceptions...
not sure how to access the wrapped exception...