ignore exceptions while print diag

This commit is contained in:
Alexey Kudravtsev
2011-06-01 17:45:25 +04:00
parent 4ce5fc3460
commit d3fefc9e1a
@@ -194,7 +194,14 @@ public class LeakHunter {
String place = leaked instanceof Project ? PlatformTestCase.getCreationPlace((Project)leaked) : "";
System.out.println("LEAK: hash: "+System.identityHashCode(leaked) + "; place: "+ place);
while (backLink != null) {
System.out.println("-->"+backLink.field+"; Value: "+backLink.value+"; "+backLink.aClass);
String valueStr;
try {
valueStr = String.valueOf(leaked);
}
catch (Exception e) {
valueStr = "("+e.getMessage()+" while computing .toString())";
}
System.out.println("-->"+backLink.field+"; Value: "+ valueStr +"; "+backLink.aClass);
backLink = backLink.backLink;
}
System.out.println(";-----");