1 11 package org.eclipse.jdt.internal.debug.eval.ast.instructions; 12 13 import org.eclipse.core.runtime.CoreException; 14 import org.eclipse.debug.core.DebugException; 15 import org.eclipse.jdt.debug.core.IJavaObject; 16 import org.eclipse.jdt.debug.core.IJavaThread; 17 18 21 public class ThrowInstruction extends CompoundInstruction { 22 23 26 public ThrowInstruction(int start) { 27 super(start); 28 } 29 30 33 public void execute() throws CoreException { 34 IJavaObject exception= (IJavaObject)popValue(); 35 final IJavaThread javaThread = getContext().getThread(); 36 javaThread.stop(exception); 37 javaThread.queueRunnable(new Runnable () { 38 public void run() { 39 try { 40 javaThread.resume(); 41 } catch (DebugException e) { 42 e.printStackTrace(); 43 } 44 } 45 }); 46 stop(); 47 } 48 49 } 50 | Popular Tags |