@Override
	default Iterator<CodeBlock> iterator() {
		return new Iterator<>() {
			@Override
			public boolean hasNext() {
				try {
					return CodeBlockIterator.this.hasNext();
				}
				catch (CancelledException e) {
					return false;
				}
			}

			@Override
			public CodeBlock next() {
				try {
					return CodeBlockIterator.this.next();
				}
				catch (CancelledException e) {
					return null;
				}
			}
		};
	}
Return the next CodeBlock.
@return the next CodeBlock.
@throws CancelledException thrown if the operation is cancelled.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/block/CodeBlockIterator.java