rendering thread dumps: handle jdi bugs

This commit is contained in:
Eugene Zhuravlev
2012-06-21 23:12:12 +02:00
parent 8604484748
commit b40bb4467c
@@ -237,7 +237,14 @@ public class ThreadDumpAction extends AnAction implements AnAction.TransparentUp
}
public static String renderObject(ObjectReference monitor) {
return DebuggerBundle.message("threads.export.attribute.label.object-id", Long.toHexString(monitor.uniqueID()), monitor.referenceType().name());
String monitorTypeName;
try {
monitorTypeName = monitor.referenceType().name();
}
catch (Throwable e) {
monitorTypeName = "Error getting monitor type: '" + e.getMessage() + "'";
}
return DebuggerBundle.message("threads.export.attribute.label.object-id", Long.toHexString(monitor.uniqueID()), monitorTypeName);
}
private static String threadStatusToJavaThreadState(int status) {