I was redirecting to an error page using LiftRules.logAndReturnExceptionToBrowser, but when I use a LoanWrapper to close a EntityManager and an error occurs when closing the entity manager, LiftRules.logAndReturnExceptionToBrowser doesn't appear to redirect to my error page. Can anyone think of a work around?
// Output a simple error to the user. Link the error message to the screen via the current datetime LiftRules.logAndReturnExceptionToBrowser = { RedirectResponse("/error); } // Set up a LoanWrapper to automatically close a EntityManager if its open S.addAround(List( new LoanWrapper { def apply[T] (f : => T): T = { try { f } finally { EM.closeEM // close if open } } })) } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---