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:
@@ -712,8 +712,10 @@ public class StringUtil
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
return object.toString();
|
return object.toString();
|
||||||
} catch (Exception e) {
|
} catch (Throwable t) {
|
||||||
return "<toString() failure: " + e + ">";
|
// We catch any throwable, even Errors. Someone is just trying to debug something,
|
||||||
|
// probably inside another catch block.
|
||||||
|
return "<toString() failure: " + t + ">";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user