From b5da6dbcaa7c8e5ee8a313d33d38b3165b5664e2 Mon Sep 17 00:00:00 2001 From: bel Date: Fri, 11 Apr 2014 22:08:24 +0200 Subject: [PATCH] Lua error handler for all errors --- test/error.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/error.lua diff --git a/test/error.lua b/test/error.lua new file mode 100644 index 00000000..b78d4ac9 --- /dev/null +++ b/test/error.lua @@ -0,0 +1,12 @@ +mg.write("HTTP/1.0 200 OK\r\n") +mg.write("Content-Type: text/html\r\n") +mg.write("\r\n") +mg.write([[ +

Lua error handler:

+

Status code: ]]) + +mg.write(tostring(mg.request_info.status)) + +mg.write([[

+ +]]) \ No newline at end of file