raise when record_if() is called without a block.