Changeset

5434:9dd36e20c1e3

moduleapi: assert() that prosody.core_post_stanza is not nil
author Matthew Wild <mwild1@gmail.com>
date Fri, 05 Apr 2013 19:13:46 +0100
parents 5432:53b16286509a
children 5435:f56e449a63e3
files core/moduleapi.lua
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/core/moduleapi.lua	Fri Apr 05 13:06:26 2013 +0100
+++ b/core/moduleapi.lua	Fri Apr 05 19:13:46 2013 +0100
@@ -21,7 +21,10 @@
 
 local prosody = prosody;
 local hosts = prosody.hosts;
-local core_post_stanza = prosody.core_post_stanza;
+
+-- FIXME: This assert() is to try and catch an obscure bug (2013-04-05)
+local core_post_stanza = assert(prosody.core_post_stanza,
+	"prosody.core_post_stanza is nil, please report this as a bug");
 
 -- Registry of shared module data
 local shared_data = setmetatable({}, { __mode = "v" });