以下代码给出错误,我不知道是什么原因,以及如何消除此错误,告诉我我做错了什么。
def members(id:String,name:String) = Action { implicit request =>
try{
session.get("userId").map{user=>
val Data =NewModel.getInfo(id)
val userId=session.get("userId").get
if(userId==Data.createdBy){
Ok(html.groupMembers(Data,"mainAdmin"))
}else{try{
val admin=NewModel.admin(id,userId);
Ok(html.members(Data,"subAdmin"))
}catch{
try{
val member=NewModel.member(id,userId)
Ok(html.members(Data,"member"));
}catch{
if(Data.privacy!="secret")
Ok(html.members(Data,"outsider"))
else
Ok(html.noPageFound())
}
}
}
}.getOrElse{
Redirect("/")
}
}catch{
case e=>
println(e)
Ok(html.onError())
}
}//end groupSetting