Sets the default end status of a single transaction.

C Language

int lr_set_transaction_status_by_name (int status, const char *trans_name);
Example: lr_set_transaction_status_by_nameTransaction Functions


status One of the Transaction Status constants for pass, fail, or stop. The auto status is not applicable.
trans_name The transaction name

The lr_set_transaction_status_by_name function sets the default status of the open transaction with name trans_name. This transaction's lr_end_transaction statement must use automatic status assignment by passing LR_AUTO as its status parameter.

A transaction's status is defined in the status parameter of lr_end_transaction. If this status is LR_AUTO, the value is automatically assigned. By default, this value is LR_PASS, signifying a successful transaction. lr_set_transaction_status_by_name changes this default value to status.

See Transaction Status.

Return Values

This function returns 0 on success and a negative value on failure.


All string arguments (char type) can be parameterized using standard parameterization.