projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad1af01
)
Enable stack tracebacks for 500 errors
author
Steven Barth
<steven@midlink.org>
Thu, 26 Feb 2009 16:45:43 +0000
(16:45 +0000)
committer
Steven Barth
<steven@midlink.org>
Thu, 26 Feb 2009 16:45:43 +0000
(16:45 +0000)
libs/web/luasrc/dispatcher.lua
patch
|
blob
|
history
diff --git
a/libs/web/luasrc/dispatcher.lua
b/libs/web/luasrc/dispatcher.lua
index 538017dc75cda5af8be6e2825425e152e37faf18..6914ffb43ef702fb10d5f864809982790b5d35dd 100644
(file)
--- a/
libs/web/luasrc/dispatcher.lua
+++ b/
libs/web/luasrc/dispatcher.lua
@@
-66,6
+66,7
@@
function error404(message)
if not luci.util.copcall(luci.template.render, "error404") then
luci.http.prepare_content("text/plain")
luci.http.write(message)
+ luci.util.perror(message)
end
return false
end
@@
-113,11
+114,9
@@
function httpdispatch(request)
table.insert(context.request, node)
end
- local stat, err = util.copcall(dispatch, context.request)
- if not stat then
- luci.util.perror(err)
- error500(err)
- end
+ local stat, err = util.coxpcall(function()
+ dispatch(context.request)
+ end, error500)
luci.http.close()