mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
catch any error from EP impl
This commit is contained in:
@@ -21,6 +21,7 @@ import com.intellij.debugger.SourcePosition;
|
||||
import com.intellij.debugger.engine.evaluation.EvaluationContext;
|
||||
import com.intellij.debugger.jdi.StackFrameProxyImpl;
|
||||
import com.intellij.debugger.requests.ClassPrepareRequestor;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.util.ThreeState;
|
||||
import com.intellij.xdebugger.frame.XStackFrame;
|
||||
import com.sun.jdi.Location;
|
||||
@@ -34,6 +35,8 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class CompoundPositionManager extends PositionManagerEx {
|
||||
private static final Logger LOG = Logger.getInstance(CompoundPositionManager.class);
|
||||
|
||||
private final ArrayList<PositionManager> myPositionManagers = new ArrayList<PositionManager>();
|
||||
|
||||
@SuppressWarnings("UnusedDeclaration")
|
||||
@@ -105,9 +108,14 @@ public class CompoundPositionManager extends PositionManagerEx {
|
||||
public XStackFrame createStackFrame(@NotNull StackFrameProxyImpl frame, @NotNull DebugProcessImpl debugProcess, @NotNull Location location) {
|
||||
for (PositionManager positionManager : myPositionManagers) {
|
||||
if (positionManager instanceof PositionManagerEx) {
|
||||
XStackFrame xStackFrame = ((PositionManagerEx)positionManager).createStackFrame(frame, debugProcess, location);
|
||||
if (xStackFrame != null) {
|
||||
return xStackFrame;
|
||||
try {
|
||||
XStackFrame xStackFrame = ((PositionManagerEx)positionManager).createStackFrame(frame, debugProcess, location);
|
||||
if (xStackFrame != null) {
|
||||
return xStackFrame;
|
||||
}
|
||||
}
|
||||
catch (Throwable e) {
|
||||
LOG.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -121,9 +129,14 @@ public class CompoundPositionManager extends PositionManagerEx {
|
||||
@NotNull String expression) {
|
||||
for (PositionManager positionManager : myPositionManagers) {
|
||||
if (positionManager instanceof PositionManagerEx) {
|
||||
ThreeState result = ((PositionManagerEx)positionManager).evaluateCondition(context, frame, location, expression);
|
||||
if (result != ThreeState.UNSURE) {
|
||||
return result;
|
||||
try {
|
||||
ThreeState result = ((PositionManagerEx)positionManager).evaluateCondition(context, frame, location, expression);
|
||||
if (result != ThreeState.UNSURE) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
catch (Throwable e) {
|
||||
LOG.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user