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


Java ExceptionEvent.thread方法代码示例

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


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

示例1: 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

示例2: exceptionEvent

import com.sun.jdi.event.ExceptionEvent; //导入方法依赖的package包/类
public void exceptionEvent(ExceptionEvent event) {

		ThreadReference thread = event.thread();

		Location lo = event.catchLocation();

		String classException = event.location().declaringType().name();

		if (!classException.contains("ClassLoader") && lo == null) {

			try {
				List<StackFrame> list = null;
				list = thread.frames();

				int i = 0;

				while (list.size() > i) {

					StackFrame frame = list.get(i);

					String className = frame.location().declaringType().name();
					
					if (!utils.isExcludedClass(className)){
						String method = frame.location().method().name();
						
						List<Data> arguments = processArguments(frame.location()
								.method(), frame.thread());

						Data returnObject = utils.getObjectFromObjectReference(
								false, "Exception", event.exception(),
								new ArrayList<Long>());

						ReferenceType ref = event.location().method()
								.declaringType(); // "class" where is declaring the
													// method
						Data object_this = processThis(event, ref, thread);

						MethodExitInfo info = new MethodExitInfo(method, className,
								returnObject, arguments, object_this);
						writer.writeMethodExitInfo(info);
					}
					
					i++;
				}

			} catch (IncompatibleThreadStateException e) {

			}

		}

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


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