if (action.equals("view")){
try{
output = user.getUser(username);
md.searchGameByUserid(output, username);
md.searchAllFavorite(output, username);
user.searchSimilarUsers(output,username);
output.setAttribute("msgType", "view");
}catch(Exception ex){
output = user.getEmptyElement(username);
output.setAttribute("msgType", "saveNew");
}
}
Saturday, August 1, 2009
User Exception Error
Right now, if a user click on the user profile the first time, he will see an error message instead, since there isn't any information about this user in the database yet. I need to make it redirect to add user interface in this case. It took me a little while to think of using catch(Exception):
Labels:
documentation,
IAT352,
project
Subscribe to:
Post Comments (Atom)


No comments:
Post a Comment