moduleapi: assert() that prosody.core_post_stanza is not nil
authorMatthew Wild <mwild1@gmail.com>
Fri, 5 Apr 2013 18:13:46 +0000 (19:13 +0100)
committerMatthew Wild <mwild1@gmail.com>
Fri, 5 Apr 2013 18:13:46 +0000 (19:13 +0100)
core/moduleapi.lua

index de900bf0c09872892a1b328a6903ba5ffda54723..fa20c3cdd9fd179e4e6e0d5acec774fb5b68b666 100644 (file)
@@ -21,7 +21,10 @@ local tonumber, tostring = tonumber, tostring;
 
 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" });