exception handling for rest services

This commit is contained in:
rlawson
2014-08-09 20:11:20 -04:00
parent c306e338db
commit 897e47f926
4 changed files with 53 additions and 5 deletions

View File

@ -35,7 +35,7 @@ public class HintService extends BaseService {
WebSession ws;
Object o = session.getAttribute(WebSession.SESSION);
if (o == null || !(o instanceof WebSession)) {
return null;
throw new IllegalArgumentException("No valid session object found, has session timed out?");
}
ws = (WebSession) o;
AbstractLesson l = ws.getCurrentLesson();