[Lift] Re: How to log exceptions?

2009-05-08 Thread sailormoo...@gmail.com
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

[Lift] Re: How to log exceptions?

2009-05-08 Thread Timothy Perrett
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 =

[Lift] Re: How to log exceptions?

2009-05-08 Thread Timothy Perrett
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

[Lift] Re: How to log exceptions?

2009-05-08 Thread sailormoo...@gmail.com
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

[Lift] Re: How to log exceptions?

2009-05-08 Thread Timothy Perrett
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

[Lift] Re: How to log exceptions?

2009-05-07 Thread David Pollak
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