[seam-commits] Seam SVN: r10039 - trunk/src/main/org/jboss/seam/exception.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Thu Feb 12 19:54:48 EST 2009


Author: norman.richards at jboss.com
Date: 2009-02-12 19:54:47 -0500 (Thu, 12 Feb 2009)
New Revision: 10039

Modified:
   trunk/src/main/org/jboss/seam/exception/Exceptions.java
Log:
JBSEAM-3952

Modified: trunk/src/main/org/jboss/seam/exception/Exceptions.java
===================================================================
--- trunk/src/main/org/jboss/seam/exception/Exceptions.java	2009-02-13 00:26:24 UTC (rev 10038)
+++ trunk/src/main/org/jboss/seam/exception/Exceptions.java	2009-02-13 00:54:47 UTC (rev 10039)
@@ -162,20 +162,18 @@
             String className = exception.attributeValue("class");
             boolean logEnabled = exception.attributeValue("log") != null ? 
                   Boolean.valueOf(exception.attributeValue("log")) : true;
+            
             LogLevel logLevel = LogLevel.error;
-            try
-            {
-               logLevel = exception.attributeValue("log-level") != null ?
-                     LogLevel.valueOf(exception.attributeValue("log-level").toLowerCase()) : null;
-                     
-               // The logLevel attribute is deprecated! Use log-level instead
-               if (logLevel == null && exception.attributeValue("logLevel") != null)
-               {
-                  logLevel = LogLevel.valueOf(exception.attributeValue("logLevel").toLowerCase());
+            try {
+               String levelValue = exception.attributeValue("log-level");
+               if (levelValue == null) {
+                   levelValue = exception.attributeValue("logLevel");
                }
-            }
-            catch (IllegalArgumentException ex)
-            { 
+               
+               if (levelValue != null) {
+                   logLevel = LogLevel.valueOf(levelValue.toLowerCase());
+               }
+            } catch (IllegalArgumentException ex) { 
                StringBuilder sb = new StringBuilder();
                sb.append("Exception handler");
                if (className != null) sb.append(" for class " + className);




More information about the seam-commits mailing list