Code

Merge branch 'collectd-4.10' into collectd-5.3
[collectd.git] / bindings / java / org / collectd / java / GenericJMX.java
index 978e989baed0487a121be5f70e399f4ec7d95f71..319615c96ff43752a44d6ac985bed8b903832756 100644 (file)
@@ -105,7 +105,17 @@ public class GenericJMX implements CollectdConfigInterface,
   public int read () /* {{{ */
   {
     for (int i = 0; i < this._connections.size (); i++)
-      this._connections.get (i).query ();
+    {
+      try
+      {
+        this._connections.get (i).query ();
+      }
+      catch (Exception e)
+      {
+        Collectd.logError ("GenericJMX: Caught unexpected exception: " + e);
+        e.printStackTrace ();
+      }
+    }
 
     return (0);
   } /* }}} int read */