当前位置: 首页>>代码示例>>Java>>正文


Java EventRequestManager.createExceptionRequest方法代码示例

本文整理汇总了Java中com.sun.jdi.request.EventRequestManager.createExceptionRequest方法的典型用法代码示例。如果您正苦于以下问题:Java EventRequestManager.createExceptionRequest方法的具体用法?Java EventRequestManager.createExceptionRequest怎么用?Java EventRequestManager.createExceptionRequest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.jdi.request.EventRequestManager的用法示例。


在下文中一共展示了EventRequestManager.createExceptionRequest方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setExceptionBreakpoints

import com.sun.jdi.request.EventRequestManager; //导入方法依赖的package包/类
@Override
public void setExceptionBreakpoints(boolean notifyCaught, boolean notifyUncaught) {
    EventRequestManager manager = vm.eventRequestManager();
    ArrayList<ExceptionRequest> legacy = new ArrayList<>(manager.exceptionRequests());
    manager.deleteEventRequests(legacy);
    // When no exception breakpoints are requested, no need to create an empty exception request.
    if (notifyCaught || notifyUncaught) {
        ExceptionRequest request = manager.createExceptionRequest(null, notifyCaught, notifyUncaught);
        request.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
        request.enable();
    }
}
 
开发者ID:Microsoft,项目名称:java-debug,代码行数:13,代码来源:DebugSession.java

示例2: createRequest

import com.sun.jdi.request.EventRequestManager; //导入方法依赖的package包/类
protected void createRequest()
{
  final EventRequestManager manager = owner.getEventRequestManager();
  if (manager != null)
  {
    try
    {
      /**
       * NOTE: (@2012-10-11, dlessa): In Juno, the list of exception requests is implemented as
       * an UnmodifiableCollection, therefore, we cannot circumvent the processing order of the
       * exception handlers any longer... Hopefully, this will not affect the semantics of
       * exception handling in Jive.
       */
      // Don't filter ExceptionEvents as they are needed to adjust the call stack
      if (request != null)
      {
        removeRequest();
      }
      request = manager.createExceptionRequest(null, true, true);
      request.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
      request.enable();
      owner.addJDIEventListener(this, request);
    }
    catch (final RuntimeException e)
    {
      JiveDebugPlugin.log(e);
    }
  }
}
 
开发者ID:UBPL,项目名称:jive,代码行数:30,代码来源:EventHandlerFactory.java

示例3: setEventRequests

import com.sun.jdi.request.EventRequestManager; //导入方法依赖的package包/类
/**
* Create the desired event requests, and enable
* them so that we will get events.
* @param excludes Class patterns for which we don't want events
* @param watchFields Do we want to watch assignments to fields
*/
   
   void setEventRequests() {
           
   	EventRequestManager mgr = vm.eventRequestManager();
       ExceptionRequest excReq = mgr.createExceptionRequest(null,true, true);
       excReq.setSuspendPolicy(EventRequest.SUSPEND_ALL);
       excReq.enable();

       MethodEntryRequest menr = mgr.createMethodEntryRequest();
       for (int i=0; i<excludes.size(); ++i) {
           menr.addClassExclusionFilter(excludes.get(i));
       }
       
       menr.setSuspendPolicy(EventRequest.SUSPEND_ALL);
       menr.enable();

       MethodExitRequest mexr = mgr.createMethodExitRequest();
       for (int i=0; i<excludes.size(); ++i) {
           mexr.addClassExclusionFilter(excludes.get(i));
       }
       mexr.setSuspendPolicy(EventRequest.SUSPEND_ALL);
       mexr.enable();
       
       ThreadDeathRequest tdr = mgr.createThreadDeathRequest();
       tdr.setSuspendPolicy(EventRequest.SUSPEND_ALL);
       tdr.enable();
      
   }
 
开发者ID:DiegoArranzGarcia,项目名称:JavaTracer,代码行数:35,代码来源:EventThread.java


注:本文中的com.sun.jdi.request.EventRequestManager.createExceptionRequest方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。