@Override
	public DataTypeComponent insert(int rowIndex, DataType dt, int dtLength)
			throws InvalidDataTypeException, UsrException {
		if (dt.equals(DataType.DEFAULT)) {
			throw new InvalidDataTypeException(
				"Inserting undefined bytes is not allowed in a union.");
		}

		return super.insert(rowIndex, dt, dtLength);
	}
Insert the named data type before the specified index.

@param rowIndex index of the row (component).

@throws InvalidDataTypeException if the union being edited is part
        of the data type being inserted or if inserting isn't allowed.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/compositeeditor/UnionEditorModel.java