Mercurial Hosting > luan
diff src/luan/modules/http/HttpServicer.java @ 1333:25746915a241
merge Luan and LuanState
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 12 Feb 2019 22:33:40 -0700 |
parents | 503bde9a7c80 |
children |
line wrap: on
line diff
--- a/src/luan/modules/http/HttpServicer.java Tue Feb 12 21:50:26 2019 -0700 +++ b/src/luan/modules/http/HttpServicer.java Tue Feb 12 22:33:40 2019 -0700 @@ -4,7 +4,7 @@ import org.slf4j.LoggerFactory; import luan.webserver.Request; import luan.webserver.Response; -import luan.LuanState; +import luan.Luan; import luan.LuanFunction; import luan.LuanException; import luan.LuanTable; @@ -15,7 +15,7 @@ public final class HttpServicer { private static final Logger logger = LoggerFactory.getLogger(HttpServicer.class); - public static Response service(LuanState luan,Request request,String modName) + public static Response service(Luan luan,Request request,String modName) throws LuanException { try { @@ -25,19 +25,19 @@ } } - private static Response handleError(LuanState luan,Request request,LuanException e) + private static Response handleError(Luan luan,Request request,LuanException e) throws LuanException { //e.printStackTrace(); synchronized(luan) { LuanCloner cloner = new LuanCloner(LuanCloner.Type.INCREMENTAL); - luan = (LuanState)cloner.clone(luan); + luan = (Luan)cloner.clone(luan); } LuanTable module = (LuanTable)luan.require("luan:http/Http.luan"); return (Response)module.call( "handle_error", request, e.table(luan) ); } - private static Response serviceLuan(LuanState luan,Request request,String modName) + private static Response serviceLuan(Luan luan,Request request,String modName) throws LuanException { LuanFunction fn; @@ -50,7 +50,7 @@ if( !(mod instanceof LuanFunction) ) throw new LuanException( "module '"+modName+"' must return a function" ); LuanCloner cloner = new LuanCloner(LuanCloner.Type.INCREMENTAL); - luan = (LuanState)cloner.clone(luan); + luan = (Luan)cloner.clone(luan); fn = (LuanFunction)cloner.get(mod); }