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:
parent
23f5080950
commit
6c53b134b6
|
@ -104,10 +104,11 @@ class DefaultExceptionContext implements ExceptionContext, Serializable {
|
|||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue