For example, trying to use
a SessionVar before the session has been created shouldn't just refuse to be set. It
would be nice to have an exception reporting the problem.
I think your points are valid to a certain degree, but for this
specific problem there's a solution in LiftRules:
/**
Should an exception be thrown on out of scope Session and RequestVar
access. By default, no.
*/
@volatile var throwOnOutOfScopeVarAccess: Boolean = false
/Jeppe
Thanks for the pointer, but I don't think it's working. After messing around with it in my own project, I did the following:
Copied from http://groups.google.com/group/liftweb/browse_thread/thread/54e059516001a518
Thanks for the pointer, but I don't think it's working. After messing around with it in my own project, I did the following:
Added
// Find out if we access SessionVars or RequestVars inappropriately.. LiftRules.throwOnOutOfScopeVarAccess = true
as the last line in Boot.boot
[info] == jetty-run == [success] Successful. [info] [info] Total time: 2 s, completed Jun 30, 2011 11:48:02 AM
(lots omitted)