better error handling for eco/jeco templates