Share this page

# lrt_gettperrno

Error Processing Functions

Gets the error status code for the last failed transaction.

int lrt_gettperrno( void );

The lrt_gettperrno function retrieves the error code for the last failed transaction. This function is used in multi-tasking environments to provide an independent error status for each task, rather than relying on the global error variable (tperrno).

## Return Values

If the function succeeds, it returns an error code for the last transaction performed by this task.

## Parameterization

Parameterization is not applicable to this function.

## Example

In the following example, lrt_gettperrno retrieves the error code for the previous buffer allocation.

Copy code

    int rc;
    lrt_tpalloc("nontype", "", 1000);
    rc = lrt_gettperrno();
    lr_output_message("error is %s", lrt_tpstrerror(rc));

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: