diff src/luan/modules/http/Server.luan @ 1520:d9a5405a3102

try statement
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 21 Jun 2020 18:14:13 -0600
parents 9ab267b9427c
children ef9d96aeb541
line wrap: on
line diff
--- a/src/luan/modules/http/Server.luan	Fri Jun 19 20:10:47 2020 -0600
+++ b/src/luan/modules/http/Server.luan	Sun Jun 21 18:14:13 2020 -0600
@@ -4,7 +4,6 @@
 local gsub = String.gsub or error()
 local match = String.match or error()
 local matches = String.matches or error()
-local try = Luan.try or error()
 local Io = require "luan:Io.luan"
 local uri = Io.uri or error()
 local Package = require "luan:Package.luan"
@@ -45,16 +44,13 @@
 end
 
 function Server.start(server)
-	try {
-		function()
-			LuanHandler.start(server)
-		end
-		catch = function(e)
---			e.java.printStackTrace();
-			Io.print_to(Io.stderr, e )
-			System.exit(-1)
-		end
-	}
+	try 
+		LuanHandler.start(server)
+	catch e
+--		e.java.printStackTrace();
+		Io.print_to(Io.stderr, e )
+		System.exit(-1)
+	end
 end
 
 function Server.start_rpc(luan_handler)