Mercurial Hosting > luan
comparison http/src/luan/modules/http/HttpServicer.java @ 646:cdc70de628b5
simplify LuanException
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 29 Mar 2016 19:58:39 -0600 |
parents | 859c0dedc8b6 |
children | ca169567ce07 |
comparison
equal
deleted
inserted
replaced
645:859c0dedc8b6 | 646:cdc70de628b5 |
---|---|
50 LuanTable per_session_pages = (LuanTable)module.rawGet("per_session_pages"); | 50 LuanTable per_session_pages = (LuanTable)module.rawGet("per_session_pages"); |
51 Object mod = PackageLuan.load(luan,modName); | 51 Object mod = PackageLuan.load(luan,modName); |
52 if( mod==null ) | 52 if( mod==null ) |
53 return false; | 53 return false; |
54 if( !(mod instanceof LuanFunction) ) | 54 if( !(mod instanceof LuanFunction) ) |
55 throw new LuanException(luan, "module '"+modName+"' must return a function" ); | 55 throw new LuanException( "module '"+modName+"' must return a function" ); |
56 if( Boolean.TRUE.equals(per_session_pages.rawGet(mod)) ) { | 56 if( Boolean.TRUE.equals(per_session_pages.rawGet(mod)) ) { |
57 HttpSession session = request.getSession(); | 57 HttpSession session = request.getSession(); |
58 LuanState sessionLuan = (LuanState)session.getValue("luan"); | 58 LuanState sessionLuan = (LuanState)session.getValue("luan"); |
59 if( sessionLuan!=null ) { | 59 if( sessionLuan!=null ) { |
60 luan = sessionLuan; | 60 luan = sessionLuan; |