package org.webdsl.lang;

import java.util.HashMap;
import java.util.Map;

/**
 *  lookup of session variables
 */
public class EnvironmentSessionVariableLookup {

	protected Map<String,Object> variables = new HashMap<String,Object>();

	public EnvironmentSessionVariableLookup(){}

	public Object getVariable(String key) {
		Object o = variables.get(key);
		if(o != null){
			return o;
		}
		else{
			throw new RuntimeException("session variable lookup failed for name: "+key);   
		}
	}

	public void putVariable(String key, Object value) {
		variables.put(key, value);
	}

}

@@ -68,16 +68,51 @@
 l.Map;%0A%0A
+import org.webdsl.logging.Logger;%0A%0A
 /**%0A *  
@@ -396,9 +396,9 @@
 f(o 
-!
+=
 = nu
@@ -409,39 +409,21 @@
 %0A%09%09%09
-return o;%0A%09%09%7D%0A%09%09else%7B%0A%09%09%09throw 
+Logger.error(
 new 
@@ -491,16 +491,26 @@
 key)
-;   %0A%09%09%7D
+);%0A%09%09%7D%0A%09%09return o;
 %0A%09%7D%0A

Change handling session variables. When lookup fails, return null instead of throwing exception. It still logs an exception.