Share this page

# TE_perror

Error Code Functions

Translates an error code into the corresponding string and prints it to the output window.

    void TE_perror( char *prefix );

## Outputs

prefix | The formatted error string.

TE_perror translates the current value of TE_errno to the corresponding error string, formats the string, and sends it to the log or output window.

The TE_perror function is equivalent to the following:

lr_error_message( "%s: %s\n", prefix, TE_sperror() )

## Return Values

This function does not return a value.

## Parameterization

You cannot use standard parameterization for any arguments in this function.

## Example

In the following example, TE_perror reports a TE_errno to the output window if a TE_wait_text or TE_wait_cursor function fails.

    TE_wait_text("C-Kermit>",TIMEOUT, 1, 24, 10, 24, NULL, NULL, NULL);

    if (TE_errno) {TE_perror("TE_wait_text"); return -1}

    TE_wait_cursor(10, 24, 1, TIMEOUT);

    if (TE_errno) {TE_perror("TE_wait_cursor"); return -1}

    TE_type("statistics<kReturn>");

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