private void executeInstruction(boolean stopAtBreakpoint, TaskMonitor monitor)
			throws CancelledException {

		lastError = null;
		try {
			if (emulator.getLastExecuteAddress() == null) {
				setProcessorContext();
			}
			emulator.executeInstruction(stopAtBreakpoint, monitor);
		}
		catch (Throwable t) {
//	TODO: need to enumerate errors better !!
			lastError = t.getMessage();
			if (lastError == null) {
				lastError = t.toString();
			}
			emulator.setHalt(true); // force execution to stop
			if (t instanceof CancelledException ce) {
				throw ce;
			}
			Msg.error(this,
				"Emulation failure at " + emulator.getExecuteAddress() + ": " + program.getName(),
				t);
		}
	}
Execute instruction at current address

@param stopAtBreakpoint if true and breakpoint hits at current execution address execution
           will halt without executing instruction.
@throws CancelledException if execution was cancelled
Ghidra/Framework/Emulation/src/main/java/ghidra/app/emulator/EmulatorHelper.java