Changeset

580:10a9538f41f1

mod_muc_log_http: Return a 500 Internal Server Error on missing theme, not a traceback.
author Waqas Hussain <waqas20@gmail.com>
date Wed, 25 Jan 2012 04:22:10 +0500
parents 579:513aa6fed9e9
children 581:a9a97df60b8c
files mod_muc_log_http/muc_log_http/mod_muc_log_http.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_muc_log_http/muc_log_http/mod_muc_log_http.lua	Wed Jan 25 04:21:17 2012 +0500
+++ b/mod_muc_log_http/muc_log_http/mod_muc_log_http.lua	Wed Jan 25 04:22:10 2012 +0500
@@ -652,7 +652,7 @@
 
 	node = urldecode(node);
 
-	assert(html.doc, "MUC hosts or theme not loaded");
+	if not html.doc then return { status = "500 Internal Server Error", "MUC hosts or theme not loaded" }; end
 
 	if host and not(hosts[host] and hosts[host].modules.muc and hosts[host].modules.muc_log) then return { status = "404 Not found", body = "No such MUC component" }; end
 	if host and node and not(hosts[host].modules.muc.rooms[node.."@"..host]) then return { status = "404 Not found", body = "No such MUC room" }; end