Throw error explicitly on param value not in range (#3950)

1 file changed