Treating Views differently from Snippets for Exception Handling purposes
In the sample below, "hi" is a simple view that has a problem in that
it has infinite recursion and so throws an exception. By default, if
I call buriedHi, I get no exceptions. If I call unearthedHi the
exception is shown.
David Pollack said:
"This looks like a bug to me... it looks like we're treating views
differently from snippets for exception purposes.
Please open a ticket at http://ticket.liftweb.net and we'll get a fix into M5."
Full thread: http://groups.google.com/group/liftweb/browse_thread/thread/13a2d9de184fb11c
it has infinite recursion and so throws an exception. By default, if
I call buriedHi, I get no exceptions. If I call unearthedHi the
exception is shown.
class foo extends InsecureLiftView {
def hi: NodeSeq = <html>{ hi }</html>
def buriedHi: NodeSeq = hi
def unearthedHi: NodeSeq = try { hi } catch { case t:Throwable => t.printStackTrace; <html><body>stack trace found</body></html> }
}
David Pollack said:
"This looks like a bug to me... it looks like we're treating views
differently from snippets for exception purposes.
Please open a ticket at http://ticket.liftweb.net and we'll get a fix into M5."
Full thread: http://groups.google.com/group/liftweb/browse_thread/thread/13a2d9de184fb11c
Leave a comment
(In revision:b1f431ecb72006a10bed02f07cdee906a57a0df2) Closes #467. Exceptions while processing views are surfaced like Snippet exceptions
Branch: master
Branch: master