On Mon, Mar 10, 2008 at 7:39 PM, James Carman
<[EMAIL PROTECTED]> wrote:
> If I'm developing a Hibernate-based application and I want to install
> some global StateObjectStateException handling code, what's the best
> way to do it? I could override Application.newRequestCycle()
> providing my own request cycle implementation which overrides the
> onRuntimeException() method. Is there a way to plug in logic which
> says "if you see exception type X, use this handler"?
notice requestcycle.onruntimeexception() has access to the exception,
and returns a page, so
myrc.onruntimexception(runtimeexception e) {
if (e.getrootcause() instanceof hibernateexception) {
return new hibernateerrorpage(e);
}
}
-igor
>
> James
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]