• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ExceptionEvent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.sun.jdi.event.ExceptionEvent的典型用法代码示例。如果您正苦于以下问题:Java ExceptionEvent类的具体用法?Java ExceptionEvent怎么用?Java ExceptionEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ExceptionEvent类属于com.sun.jdi.event包,在下文中一共展示了ExceptionEvent类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: wrap

import com.sun.jdi.event.ExceptionEvent; //导入依赖的package包/类
public static F3Event wrap(F3VirtualMachine f3vm, Event evt) {
    if (evt == null) {
        return null;
    }
    if (evt instanceof AccessWatchpointEvent) {
        return new F3AccessWatchpointEvent(f3vm, (AccessWatchpointEvent)evt);
    } else if (evt instanceof BreakpointEvent) {
        return new F3BreakpointEvent(f3vm, (BreakpointEvent)evt);
    } else if (evt instanceof ClassPrepareEvent) {
        return new F3ClassPrepareEvent(f3vm, (ClassPrepareEvent)evt);
    } else if (evt instanceof ClassUnloadEvent) {
        return new F3ClassUnloadEvent(f3vm, (ClassUnloadEvent)evt);
    } else if (evt instanceof ExceptionEvent) {
        return new F3ExceptionEvent(f3vm, (ExceptionEvent)evt);
    } else if (evt instanceof MethodEntryEvent) {
        return new F3MethodEntryEvent(f3vm, (MethodEntryEvent)evt);
    } else if (evt instanceof MethodExitEvent) {
        return new F3MethodExitEvent(f3vm, (MethodExitEvent)evt);
    } else if (evt instanceof ModificationWatchpointEvent) {
        return new F3ModificationWatchpointEvent(f3vm, (ModificationWatchpointEvent)evt);
    } else if (evt instanceof MonitorContendedEnterEvent) {
        return new F3MonitorContendedEnterEvent(f3vm, (MonitorContendedEnterEvent)evt);
    } else if (evt instanceof MonitorContendedEnteredEvent) {
        return new F3MonitorContendedEnteredEvent(f3vm, (MonitorContendedEnteredEvent)evt);
    } else if (evt instanceof MonitorWaitEvent) {
        return new F3MonitorWaitEvent(f3vm, (MonitorWaitEvent)evt);
    } else if (evt instanceof MonitorWaitedEvent) {
        return new F3MonitorWaitedEvent(f3vm, (MonitorWaitedEvent)evt);
    } else if (evt instanceof StepEvent) {
        return new F3StepEvent(f3vm, (StepEvent)evt);
    } else if (evt instanceof ThreadDeathEvent) {
        return new F3ThreadDeathEvent(f3vm, (ThreadDeathEvent)evt);
    } else if (evt instanceof ThreadStartEvent) {
        return new F3ThreadStartEvent(f3vm, (ThreadStartEvent)evt);
    } else if (evt instanceof VMDeathEvent) {
        return new F3VMDeathEvent(f3vm, (VMDeathEvent)evt);
    } else if (evt instanceof VMDisconnectEvent) {
        return new F3VMDisconnectEvent(f3vm, (VMDisconnectEvent)evt);
    } else if (evt instanceof VMStartEvent) {
        return new F3VMStartEvent(f3vm, (VMStartEvent)evt);
    } else if (evt instanceof WatchpointEvent) {
        return new F3WatchpointEvent(f3vm, (WatchpointEvent)evt);
    } else if (evt instanceof LocatableEvent) {
        return new F3LocatableEvent(f3vm, (LocatableEvent)evt);
    } else {
        return new F3Event(f3vm, evt);
    }
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:49,代码来源:F3Event.java


示例2: resumeToException

import com.sun.jdi.event.ExceptionEvent; //导入依赖的package包/类
public ExceptionEvent resumeToException() {
    return (ExceptionEvent) resumeToEvent(new EventFilter() {
        public boolean match(Event evt) {
            return (evt instanceof ExceptionEvent);
        }
    });
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:8,代码来源:Debugger.java


示例3: jdiExceptionThrown

import com.sun.jdi.event.ExceptionEvent; //导入依赖的package包/类
@Override
public synchronized void jdiExceptionThrown(final ExceptionEvent event)
{
  if (!override && !owner.isStarted())
  {
    return;
  }
  try
  {
    delegate.handleExceptionThrown(event);
  }
  catch (final Throwable e)
  {
    JiveDebugPlugin.log(e);
  }
}
 
开发者ID:UBPL,项目名称:jive,代码行数:17,代码来源:JDIEventHandler.java


示例4: createCatchEvent

import com.sun.jdi.event.ExceptionEvent; //导入依赖的package包/类
IJiveEvent createCatchEvent(final StackFrame catchFrame, final ExceptionEvent event)
{
  final IThreadValue threadId = resolveThread(catchFrame);
  final StackFrame frame = executionState().framePeek(catchFrame.thread().uniqueID());
  if (!executionState().containsInModelFrame(frame))
  {
    throw new IllegalStateException("A method contour was not found for the given stack frame.");
  }
  final IMethodContour catcher = executionState().lookupContour(frame);
  final IValue exception = resolveReference(event.thread(), event.exception(), null);
  final IContourMember variable = resolveCatchVariable(event, catchFrame, catcher);
  // update the source location-- no harm done if the location hasn't changed
  executionState().nextLine(threadId, resolveLine(event.catchLocation()));
  final ILineValue line = executionState().currentLine(threadId);
  return eventFactory().createExceptionCatchEvent(threadId, line, exception, variable);
}
 
开发者ID:UBPL,项目名称:jive,代码行数:17,代码来源:EventFactoryAdapter.java


示例5: eventLoop

import com.sun.jdi.event.ExceptionEvent; //导入依赖的package包/类
private void eventLoop() throws InterruptedException {
	System.out.println("eventLoop started");
	EventQueue eventQueue = vm.eventQueue();
	boolean isRunning = true;
	while (isRunning) {
		EventSet eventSet = eventQueue.remove();
		boolean mayResume = true;
		for (Event event : eventSet) {
			System.out.println(event);
			if (event instanceof VMDeathEvent
					|| event instanceof VMDisconnectEvent) {
				isRunning = false;
			} else if (event instanceof ExceptionEvent) {
				mayResume = false;
			}
		}
		if (mayResume) eventSet.resume();
	}
}
 
开发者ID:gravel-st,项目名称:gravel,代码行数:20,代码来源:VMRemoteTarget.java


示例6: processThis

import com.sun.jdi.event.ExceptionEvent; //导入依赖的package包/类
private Data processThis(ExceptionEvent event, ReferenceType ref,
		ThreadReference thread) {

	StackFrame stack = null;

	try {
		stack = thread.frame(0);
	} catch (IncompatibleThreadStateException e) {
		e.printStackTrace();
	}

	Data valueThis = utils.getObj("this", stack.thisObject(),
			new ArrayList<Long>());

	return valueThis;
}
 
开发者ID:DiegoArranzGarcia,项目名称:JavaTracer,代码行数:17,代码来源:ExceptionManager.java


示例7: handleEvent

import com.sun.jdi.event.ExceptionEvent; //导入依赖的package包/类
/**
* Dispatch incoming events
*/
   
   private void handleEvent(Event event) {
       if (event instanceof ExceptionEvent) {
       	if (!enableProfiling)
       		exceptionManager.exceptionEvent((ExceptionEvent)event);
       } else if (event instanceof MethodEntryEvent) {
       	methodEntryEvent((MethodEntryEvent)event);
       } else if (event instanceof MethodExitEvent) {
       	methodExitEvent((MethodExitEvent)event);
       } else if (event instanceof ThreadDeathEvent) {
           threadeath.threadDeathEvent((ThreadDeathEvent)event);
       } else if (event instanceof VMDeathEvent) {
       	vmDeathEvent((VMDeathEvent)event);
       } else if (event instanceof VMDisconnectEvent) {
           connected = disconnect.vmDisconnectEvent((VMDisconnectEvent)event);
       } 
   }
 
开发者ID:DiegoArranzGarcia,项目名称:JavaTracer,代码行数:21,代码来源:EventThread.java


示例8: exceptionEvent

import com.sun.jdi.event.ExceptionEvent; //导入依赖的package包/类
public void exceptionEvent(ExceptionEvent evt) {
    synchronized (listeners) {
        for (EventNotifier en : listeners) {
            en.exceptionEvent(evt);
        }
    }
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:8,代码来源:Debugger.java


示例9: checkExceptionEvent

import com.sun.jdi.event.ExceptionEvent; //导入依赖的package包/类
/**
* We call this method just before throwing an Exception and make sure it ExceptionEvent.
*/
   private void checkExceptionEvent() {
       Event event = resumeToAnyEvent();
       System.out.println("Exception request is " + event);
       Assert.assertTrue(event instanceof ExceptionEvent || event instanceof ThreadStartEvent);
       list();
   }
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:10,代码来源:ExceptionCatchTest.java


示例10: handleEvent

import com.sun.jdi.event.ExceptionEvent; //导入依赖的package包/类
@Override
public boolean handleEvent(final Event event, final JDIDebugTarget target,
    final boolean suspendVote, final EventSet eventSet)
{
  if (owner.isActive())
  {
    owner.jdiHandler().jdiExceptionThrown((ExceptionEvent) event);
  }
  return true;
}
 
开发者ID:UBPL,项目名称:jive,代码行数:11,代码来源:EventHandlerFactory.java


示例11: createThrowEvent

import com.sun.jdi.event.ExceptionEvent; //导入依赖的package包/类
IJiveEvent createThrowEvent(final ExceptionEvent event, final boolean framePopped)
{
  final IThreadValue threadId = resolveThread(event);
  final IValue thrower = resolveThrower(event.thread(), framePopped);
  final IValue exception = resolveReference(event.thread(), event.exception(), null);
  // defensively record the location-- no harm done if the location hasn't changed
  final ILineValue nextLine = resolveLine(event.location());
  if (nextLine != valueFactory().createUnavailableLine())
  {
    executionState().nextLine(threadId, nextLine);
  }
  final ILineValue line = executionState().currentLine(threadId);
  return eventFactory()
      .createExceptionThrowEvent(threadId, line, exception, thrower, framePopped);
}
 
开发者ID:UBPL,项目名称:jive,代码行数:16,代码来源:EventFactoryAdapter.java


示例12: outstandingException

import com.sun.jdi.event.ExceptionEvent; //导入依赖的package包/类
private ExceptionEvent outstandingException(final ThreadReference thread)
{
  final ExceptionEvent result = executionState().lookupException(thread.uniqueID());
  if (result == null)
  {
    throw new IllegalStateException("An exception has not occurred on the thread.");
  }
  return result;
}
 
开发者ID:UBPL,项目名称:jive,代码行数:10,代码来源:JDIEventHandlerDelegate.java


示例13: handleThreadDeath

import com.sun.jdi.event.ExceptionEvent; //导入依赖的package包/类
void handleThreadDeath(final ThreadDeathEvent event)
{
  final ThreadReference thread = event.thread();
  /**
   * If a thread dies with outstanding frames, then all frames are popped with an exception. An
   * unexpected termination is gracefully handled by the execution model.
   */
  while (executionState().frameCount(thread.uniqueID()) != 0)
  {
    // if by any chance the VM generated a throw event
    if (executionState().containsException(thread.uniqueID()))
    {
      final ExceptionEvent exception = outstandingException(thread);
      dispatcher().dispatchThrowEvent(exception, true);
    }
    else
    {
      dispatcher().dispatchThrowEvent(thread, true);
    }
  }
  if (executionState().containsException(thread.uniqueID()))
  {
    removeException(thread);
  }
  handlePendingReturned(null, null, event.thread());
  final IThreadValue threadValue = owner.model().valueFactory()
      .createThread(thread.uniqueID(), thread.name());
  // avoid duplicate thread termination
  final IThreadStartEvent threadStart = owner.model().lookupThread(threadValue);
  if (threadStart != null && threadStart.terminator() == null)
  {
    dispatcher().dispatchThreadDeath(event.thread());
  }
}
 
开发者ID:UBPL,项目名称:jive,代码行数:35,代码来源:JDIEventHandlerDelegate.java


示例14: jdiExceptionThrown

import com.sun.jdi.event.ExceptionEvent; //导入依赖的package包/类
/**
 * Notification of an exception in the target VM. When an exception is thrown which satisfies a
 * currently enabled exception request, an event set containing an instance of this class will be
 * added to the VM's event queue. If the exception is thrown from a non-native method, the
 * exception event is generated at the location where the exception is thrown. If the exception is
 * thrown from a native method, the exception event is generated at the first non-native location
 * reached after the exception is thrown.
 * 
 * @param event
 * 
 * @see <a href="">http://docs.oracle.com/javase/7/docs/jdk/api/jpda/jdi/index.html</a>
 */
@Override
public void jdiExceptionThrown(final ExceptionEvent event)
{
  //
  //
  this.currentEvent = event;
  this.currentThread = event.thread();
  //
  //
  this.currentEvent = null;
  this.currentThread = null;
}
 
开发者ID:UBPL,项目名称:jive,代码行数:25,代码来源:EventHandlerLite.java


示例15: exceptionEvents

import com.sun.jdi.event.ExceptionEvent; //导入依赖的package包/类
/**
 * Gets the observable object for exception events.
 * @return      the observable object for exception events
 */
@Override
public  Observable<DebugEvent> exceptionEvents() {
    return this.events().filter(debugEvent -> debugEvent.event instanceof ExceptionEvent);
}
 
开发者ID:Microsoft,项目名称:java-debug,代码行数:9,代码来源:EventHub.java


示例16: getThisObject

import com.sun.jdi.event.ExceptionEvent; //导入依赖的package包/类
protected ObjectReference getThisObject(SuspendContextImpl context, LocatableEvent event) throws EvaluateException {
  if(event instanceof ExceptionEvent) {
    return ((ExceptionEvent) event).exception();
  }
  return super.getThisObject(context, event);    //To change body of overriden methods use Options | File Templates.
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:ExceptionBreakpoint.java


示例17: getEventMessage

import com.sun.jdi.event.ExceptionEvent; //导入依赖的package包/类
public String getEventMessage(LocatableEvent event) {
  String exceptionName = (getQualifiedName() != null)? getQualifiedName() : CommonClassNames.JAVA_LANG_THROWABLE;
  String threadName    = null;
  if (event instanceof ExceptionEvent) {
    ExceptionEvent exceptionEvent = (ExceptionEvent)event;
    try {
      exceptionName = exceptionEvent.exception().type().name();
      threadName = exceptionEvent.thread().name();
    }
    catch (Exception ignore) {
    }
  }
  final Location location = event.location();
  final String locationQName = DebuggerUtilsEx.getLocationMethodQName(location);
  String locationFileName;
  try {
    locationFileName = location.sourceName();
  }
  catch (AbsentInformationException e) {
    locationFileName = "";
  }
  final int locationLine = Math.max(0, location.lineNumber());
  if (threadName != null) {
    return DebuggerBundle.message(
      "exception.breakpoint.console.message.with.thread.info", 
      exceptionName, 
      threadName,
      locationQName,
      locationFileName,
      locationLine
    );
  }
  else {
    return DebuggerBundle.message(
      "exception.breakpoint.console.message", 
      exceptionName,
      locationQName,
      locationFileName,
      locationLine
    );
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:43,代码来源:ExceptionBreakpoint.java


示例18: F3ExceptionEvent

import com.sun.jdi.event.ExceptionEvent; //导入依赖的package包/类
public F3ExceptionEvent(F3VirtualMachine f3vm, ExceptionEvent underlying) {
    super(f3vm, underlying);
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:4,代码来源:F3ExceptionEvent.java


示例19: underlying

import com.sun.jdi.event.ExceptionEvent; //导入依赖的package包/类
@Override
protected ExceptionEvent underlying() {
    return (ExceptionEvent) super.underlying();
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:5,代码来源:F3ExceptionEvent.java


示例20: exceptionEvent

import com.sun.jdi.event.ExceptionEvent; //导入依赖的package包/类
public void exceptionEvent(ExceptionEvent e) {
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:3,代码来源:EventNotifierAdapter.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java NodeTraversor类代码示例发布时间:2022-05-21
下一篇:
Java Config类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap