commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r905922 - /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/exception/DefaultExceptionContext.java
Date Wed, 03 Feb 2010 07:38:17 GMT
Author: bayard
Date: Wed Feb  3 07:38:17 2010
New Revision: 905922

URL: http://svn.apache.org/viewvc?rev=905922&view=rev
Log:
Fixing LANG-585. Don't catch Throwable, catch Exception instead. 

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/exception/DefaultExceptionContext.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/exception/DefaultExceptionContext.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/exception/DefaultExceptionContext.java?rev=905922&r1=905921&r2=905922&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/exception/DefaultExceptionContext.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/exception/DefaultExceptionContext.java
Wed Feb  3 07:38:17 2010
@@ -104,10 +104,11 @@
                     buffer.append("null");
                 }
                 else {
-                    try {valueStr = value.toString();}
-                    catch (Throwable t) {
-                        valueStr = "Excepted on toString(): " + 
-                            ExceptionUtils.getStackTrace(t);
+                    try {
+                        valueStr = value.toString();
+                    }
+                    catch (Exception e) {
+                        valueStr = "Exception thrown on toString(): " + ExceptionUtils.getStackTrace(e);
                     }
                     buffer.append(valueStr);
                 }



Mime
View raw message