Java 类com.sun.jdi.NativeMethodException 实例源码

项目:tools-idea    文件:PopFrameAction.java   
public void actionPerformed(AnActionEvent e) {
  Project project = e.getData(PlatformDataKeys.PROJECT);
  StackFrameProxyImpl stackFrame = getStackFrameProxy(e);
  if(stackFrame == null) {
    return;
  }
  try {
    DebuggerContextImpl debuggerContext = DebuggerAction.getDebuggerContext(e.getDataContext());
    DebugProcessImpl debugProcess = debuggerContext.getDebugProcess();
    if(debugProcess == null) {
      return;
    }
    debugProcess.getManagerThread().schedule(debugProcess.createPopFrameCommand(debuggerContext, stackFrame));
  }
  catch (NativeMethodException e2){
    Messages.showMessageDialog(project, DebuggerBundle.message("error.native.method.exception"), ActionsBundle.actionText(DebuggerActions.POP_FRAME), Messages.getErrorIcon());
  }
  catch (InvalidStackFrameException ignored) {
  }
  catch(VMDisconnectedException vde) {
  }
}
项目:openjdk-jdk10    文件:EventRequestManagerImpl.java   
public BreakpointRequest createBreakpointRequest(Location location) {
    validateMirror(location);
    if (location.codeIndex() == -1) {
        throw new NativeMethodException("Cannot set breakpoints on native methods");
    }
    return new BreakpointRequestImpl(location);
}