errorListener()

User callback function for handling errors

Signature

function errorListener(fd, errorid, errormessage) { //user implementation }

Arguments

Argument Type Description
fd Integer A file descriptor returned by ppsService.open(). Required.
errorid Number

A code that indicates the error type. Required.

Return error values:

1 — Open error
    2 — Read error
    3 — Watch error
    4 — Write error
    5 — PPS file descriptor not found
    6 — Data listener not found
    7 — Unexpected data format

errormessage String A message that describes the error. Required.

Description

The user implements the errorListener() callback function to perform error handling.

All error listeners used by ppsService methods have the same function signature.