use of com.sun.jdi.InternalException in project intellij-community by JetBrains.
the class DebugProcessEvents method getEventText.
public String getEventText(Pair<Breakpoint, Event> descriptor) {
String text = "";
final Event event = descriptor.getSecond();
final Breakpoint breakpoint = descriptor.getFirst();
if (event instanceof LocatableEvent) {
try {
text = breakpoint != null ? breakpoint.getEventMessage(((LocatableEvent) event)) : DebuggerBundle.message("status.generic.breakpoint.reached");
} catch (InternalException e) {
text = DebuggerBundle.message("status.generic.breakpoint.reached");
}
} else if (event instanceof VMStartEvent) {
text = DebuggerBundle.message("status.process.started");
} else if (event instanceof VMDeathEvent) {
text = DebuggerBundle.message("status.process.terminated");
} else if (event instanceof VMDisconnectEvent) {
final RemoteConnection connection = getConnection();
final String addressDisplayName = DebuggerBundle.getAddressDisplayName(connection);
final String transportName = DebuggerBundle.getTransportName(connection);
text = DebuggerBundle.message("status.disconnected", addressDisplayName, transportName);
}
return text;
}
use of com.sun.jdi.InternalException in project intellij-community by JetBrains.
the class NodeManagerImpl method getContextKeyForFrame.
@Nullable
public static String getContextKeyForFrame(final StackFrameProxyImpl frame) {
if (frame == null) {
return null;
}
try {
final Location location = frame.location();
final Method method = DebuggerUtilsEx.getMethod(location);
if (method == null) {
return null;
}
final ReferenceType referenceType = location.declaringType();
final StringBuilder builder = StringBuilderSpinAllocator.alloc();
try {
return builder.append(referenceType.signature()).append("#").append(method.name()).append(method.signature()).toString();
} finally {
StringBuilderSpinAllocator.dispose(builder);
}
} catch (EvaluateException ignored) {
} catch (InternalException ie) {
if (ie.errorCode() != 23) {
// INVALID_METHODID
throw ie;
}
}
return null;
}
Aggregations