Catch any Throwable in safeToString().

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2102 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
ray
2007-05-10 18:47:41 +00:00
parent 92a095968c
commit a67145f933
+4 -2
View File
@@ -712,8 +712,10 @@ public class StringUtil
{
try {
return object.toString();
} catch (Exception e) {
return "<toString() failure: " + e + ">";
} catch (Throwable t) {
// We catch any throwable, even Errors. Someone is just trying to debug something,
// probably inside another catch block.
return "<toString() failure: " + t + ">";
}
}