import com.intellij.debugger.DebuggerBundle;
import com.intellij.debugger.engine.DebugProcess;
import com.intellij.debugger.engine.evaluation.EvaluateException;
-import com.intellij.debugger.engine.evaluation.EvaluateExceptionUtil;
import com.intellij.debugger.engine.evaluation.EvaluationContextImpl;
import com.intellij.debugger.ui.tree.NodeDescriptor;
import com.intellij.debugger.ui.tree.render.DescriptorLabelListener;
import com.intellij.openapi.util.Key;
import com.intellij.util.containers.HashMap;
import com.intellij.xdebugger.impl.ui.tree.ValueMarkup;
+import com.sun.jdi.InconsistentDebugInfoException;
import com.sun.jdi.InvalidStackFrameException;
import com.sun.jdi.ObjectReference;
import org.jetbrains.annotations.Nullable;
myEvaluateException = null;
myLabel = calcRepresentation(context, labelListener);
}
+ catch (InconsistentDebugInfoException e) {
+ throw new EvaluateException(DebuggerBundle.message("error.inconsistent.debug.info"));
+ }
+ catch (InvalidStackFrameException e) {
+ throw new EvaluateException(DebuggerBundle.message("error.invalid.stackframe"));
+ }
catch (RuntimeException e) {
- LOG.debug(e);
- throw processException(e);
+ LOG.error(e);
+ throw new EvaluateException("Internal error, see logs for more details");
}
}
catch (EvaluateException e) {
protected abstract String calcRepresentation(EvaluationContextImpl context, DescriptorLabelListener labelListener) throws EvaluateException;
- private static EvaluateException processException(Exception e) {
- if (e instanceof InvalidStackFrameException) {
- return new EvaluateException(DebuggerBundle.message("error.invalid.stackframe"), null);
- }
- else {
- return EvaluateExceptionUtil.createEvaluateException(e);
- }
- }
-
@Override
public void displayAs(NodeDescriptor descriptor) {
if (descriptor instanceof NodeDescriptorImpl) {