com.sun.jdi.event.ExceptionEvent Java Examples

The following examples show how to use com.sun.jdi.event.ExceptionEvent. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: VMRemoteTarget.java    From gravel with Apache License 2.0 6 votes vote down vote up
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();
	}
}
 
Example #2
Source File: EventHub.java    From java-debug with Eclipse Public License 1.0 4 votes vote down vote up
/**
 * 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);
}
 
Example #3
Source File: VMRemoteProcess.java    From gravel with Apache License 2.0 4 votes vote down vote up
public void processExceptionEvent(ExceptionEvent exEvent) {
	isUnderDebug = true;
	debugOrAnswerSema.release();
}