.ERROR Statement

When the preprocessor sees a .ERROR statement in the deck file, it aborts the simulation and outputs the error message

You will want to put the .ERROR statement inside a .IF branch statement

.IF { logical_test }
	.ERROR "Error message"
.ENDIF