Author: bklaas
Date: Mon Jun 21 13:42:23 2010
New Revision: 8902

URL: http://svn.slimdevices.com/jive?rev=8902&view=rev
Log:
Fixed Bug: 16307
Description: Encapsulate calls to notify_* methods in applets in pcall()s so 
one failure doesn't kill all the rest of the applet method calls.

Modified:
    7.6/trunk/squeezeplay/src/squeezeplay/share/jive/net/NetworkThread.lua

Modified: 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/net/NetworkThread.lua
URL: 
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/jive/net/NetworkThread.lua?rev=8902&r1=8901&r2=8902&view=diff
==============================================================================
--- 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/net/NetworkThread.lua 
(original)
+++ 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/net/NetworkThread.lua Mon 
Jun 21 13:42:23 2010
@@ -259,9 +259,16 @@
        
        for k,v in pairs(self.subscribers) do
                if k[method] and type(k[method]) == 'function' then
-                       k[method](k, ...)
-               end
-       end
+                       local ok, resOrErr = pcall(k[method], k, ...)
+                       if not ok then
+                               log:error("Error running ", method, ":", 
resOrErr)
+                       else
+                               if k._entry and k._entry.appletName then
+                                       log:debug(method, ' sent to ', 
k._entry.appletName)
+                               end
+                       end
+               end
+        end
 end
 
 

_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins

Reply via email to