Define Error Handler - Parallel Transporter

Teradata Parallel Transporter Operator Programmer Guide

Product
Parallel Transporter
Release Number
16.20
Published
October 2018
Language
English (United States)
Last Update
2018-10-10
dita:mapPath
vxb1527114222350.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2435
lifecycle
previous
Product Category
Teradata Tools and Utilities

Purpose

Define Error Handler is the service function that identifies the function to be called if an error occurs in the Logger API. The return value is a pointer to the function previously called when an error occurred.

Structure

#include <pxoper.h>
PXSTC_Code PX_SetLogError(PX_LogHandle  loghandle, PX_ErrorProc  errorproc);

where the following is true:

Parameter Function Specification
loghandle input The handle to the log stream. The structure is allocated by the Logger API.
errorproc input The function to be called when an error occurs.

Return Codes

The Define Error Handler function returns the address of the function previously defined.

Status Code Signifies
void* The address of the error procedure previously used.

Usage Notes

Consider the following when using the Define Error Handler function.

Topic Usage Notes
See Also Initiate Log Stream

Example - Define Error Handler

#include <pxoper.h>
PX_ErrorProc  myerror1, myerror2;
PX_LogHandle loghandle;
PX_LogInit(oprhandle, "mycomponent", 75, NULL, myerror1, &loghandle);
PX_SetLogError(loghandle, myerror2);
PX_Terminate(loghandle);