protected void checkEditsAllowed(Address addr, long length) throws ByteBlockAccessException {
		if (!editAllowed(addr, length)) {
			String msg = "Instruction exists at address " + addr;
			if (length > 1) {
				Address toAddr = null;
				try {
					toAddr = addr.addNoWrap(length);
				}
				catch (AddressOverflowException e) {
				}
				msg = "Instruction exists in address range " + addr + " to " + toAddr;
			}
			throw new ByteBlockAccessException(msg);
		}
	}
Check for whether edits are allowed at the given address; edits are not allowed if a code
unit (other than undefined data) exists at the given address.
Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/MemoryByteBlock.java