Author: michiel
Date: 2010-03-18 11:50:40 +0100 (Thu, 18 Mar 2010)
New Revision: 41499

Modified:
   
mmbase/trunk/applications/vpro-wizards/src/main/java/org/mmbase/applications/vprowizards/spring/GlobalError.java
Log:
exceptions from exceptions are asking for obfuscation

Modified: 
mmbase/trunk/applications/vpro-wizards/src/main/java/org/mmbase/applications/vprowizards/spring/GlobalError.java
===================================================================
--- 
mmbase/trunk/applications/vpro-wizards/src/main/java/org/mmbase/applications/vprowizards/spring/GlobalError.java
    2010-03-18 10:24:48 UTC (rev 41498)
+++ 
mmbase/trunk/applications/vpro-wizards/src/main/java/org/mmbase/applications/vprowizards/spring/GlobalError.java
    2010-03-18 10:50:40 UTC (rev 41499)
@@ -12,11 +12,14 @@
 import java.util.Locale;
 import java.util.ResourceBundle;
 
+import org.mmbase.util.logging.Logger;
+import org.mmbase.util.logging.Logging;
 
 /**
  */
 
 public class GlobalError extends RuntimeException {
+    private static final Logger log = 
Logging.getLoggerInstance(GlobalError.class);
 
     /**
      * This is the type of error that is created when something went wrong, 
and the transaction can not be committed in
@@ -64,9 +67,16 @@
      *             when the key was not found in the bundle
      */
     public String getMessage() {
-        String message = bundle.getString(messageKey);
-        if (message == null || "".equals(message)) {
-            throw new RuntimeException("no message declared in bundle for key 
'" + messageKey + "'");
+        String message;
+        try {
+            message = bundle.getString(messageKey);
+            if (message == null || "".equals(message)) {
+                log.warn("no message declared in bundle for key '" + 
messageKey + "'");
+                return messageKey;
+            }
+        } catch (java.util.MissingResourceException mre) {
+            log.warn(mre);
+            return messageKey;
         }
         int count = 0;
         if (properties != null) {

_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to