Fixing LANG-585. Don't catch Throwable, catch Exception instead.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@905922 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Henri Yandell 2010-02-03 07:38:17 +00:00
parent 23f5080950
commit 6c53b134b6
1 changed files with 5 additions and 4 deletions

View File

@ -104,10 +104,11 @@ public String getFormattedExceptionMessage(String baseMessage){
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);
}