Update of /var/cvs/src/org/mmbase/util/functions
In directory james.mmbase.org:/tmp/cvs-serv28551

Modified Files:
        FunctionSets.java 
Log Message:
try/catch


See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/util/functions


Index: FunctionSets.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/util/functions/FunctionSets.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- FunctionSets.java   25 Nov 2007 18:25:49 -0000      1.31
+++ FunctionSets.java   26 Jun 2008 16:40:26 -0000      1.32
@@ -36,7 +36,7 @@
  * @author Daniël Ockeloen
  * @author Michiel Meeuwissen
  * @since  MMBase-1.8
- * @version $Id: FunctionSets.java,v 1.31 2007/11/25 18:25:49 nklasens Exp $
+ * @version $Id: FunctionSets.java,v 1.32 2008/06/26 16:40:26 michiel Exp $
  */
 public class FunctionSets {
 
@@ -90,10 +90,10 @@
                         readSets(this);
                     }
                 };
+            readSets(watcher);
             watcher.start();
-            watcher.onChange("functionsets.xml");
         } catch (Throwable t) {
-            log.error(t.getClass().getName() + ": " + Logging.stackTrace(t));
+            log.error(t.getClass().getName(), t);
         }
 
     }
@@ -138,6 +138,7 @@
                     DocumentReader reader = new DocumentReader(source, 
FunctionSets.class);
 
                     for (Element n: reader.getChildElements("functionsets", 
"functionset")) {
+                        try {
                         String setName     = n.getAttribute("name");
                         if (functionSets.containsKey(setName)) {
                             log.warn("The function-set '" + setName + "' did 
exist already");
@@ -146,6 +147,9 @@
                         if (setResource.equals("")) setResource = 
n.getAttribute("file"); // deprecated, it's not necessarily a file
                         watcher.add(setResource);
                         decodeFunctionSet(watcher.getResourceLoader(), 
setResource, setName);
+                        } catch (Throwable t) {
+                            log.error(t.getMessage());
+                        }
                     }
                 }
             } catch (Exception e) {
@@ -163,6 +167,7 @@
     private static void decodeFunctionSet(ResourceLoader loader, String 
setResource, String setName) throws IOException {
         DocumentReader reader = new 
DocumentReader(loader.getInputSource(setResource), FunctionSets.class);
 
+        log.service("Parsing " + reader.getSystemId());
         String setDescription = 
reader.getElementValue("functionset.description");
 
         FunctionSet functionSet = new FunctionSet(setName, setDescription);
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to