Changeset

8689:c7122fbe1600

net.http: Fix for Lua 5.2: return error from error handler (xpcall changed)
author Matthew Wild <mwild1@gmail.com>
date Sat, 24 Mar 2018 11:29:04 +0000
parents 8688:019b4b3dd5ad
children 8690:0f6623712239
files net/http.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/http.lua	Sat Mar 24 21:39:03 2018 +0100
+++ b/net/http.lua	Sat Mar 24 11:29:04 2018 +0000
@@ -36,7 +36,7 @@
 local listener = { default_port = 80, default_mode = "*a" };
 
 -- Request-related helper functions
-local function handleerr(err) log("error", "Traceback[http]: %s", traceback(tostring(err), 2)); end
+local function handleerr(err) log("error", "Traceback[http]: %s", traceback(tostring(err), 2)); return err; end
 local function log_if_failed(id, ret, ...)
 	if not ret then
 		log("error", "Request '%s': error in callback: %s", id, tostring((...)));