Thanks, but I cannot find the type of ExceptionHandlerPF in the Lift
doc.
Something like this?
LiftRules.exceptionHandler.prepend((x: NodeSeq) = Log.error(x)).
On 5月8日, 上午12時08分, David Pollak feeder.of.the.be...@gmail.com wrote:
Exceptions are handled in LiftRules.exceptionHandler
You can
It would be something more like this:
LiftRules.exceptionHandler.prepend {
case (production, Req(path, , GetRequest), SomeException) = {
Log.error(MELT DOWN!!)
RedirectResponse(/)
}
}
The signature of the exception handler type is:
type ExceptionHandlerPF =
Sorry, scratch that - made a slight error writing that code from
memory! It should read:
LiftRules.exceptionHandler.prepend {
case (Props.RunModes.Production, Req(path, , GetRequest),
exception) = {
Log.error(MELT DOWN!!)
RedirectResponse(/)
}
}
Cheers, Tim
Thanks for the help.
What I need might like this
LiftRules.exceptionHandler.prepend {
case (_, _, exception) = {
Log.error(exception.getStackTrace.toString)
RedirectResponse(/)
}
}
--~--~-~--~~~---~--~~
You received this message
Thanks for the help.
Your most welcome.
What I need might like this
LiftRules.exceptionHandler.prepend {
case (_, _, exception) = {
Log.error(exception.getStackTrace.toString)
RedirectResponse(/)
}
}
If that works for your needs, go for it. The only
Exceptions are handled in LiftRules.exceptionHandler
You can replace the RulesSeq[ExceptionHandlerPF] with your own or prepend a
handler that will log exceptions.
On Thu, May 7, 2009 at 7:44 AM, sailormoo...@gmail.com
sailormoo...@gmail.com wrote:
Hi :
Sometimes exceptions are shown in