[manual index][section index]

NAME

werrstr - set the system error string

SYNOPSIS

include "sys.m";
sys := load Sys Sys->PATH;

werrstr(s: string): int;

DESCRIPTION

When a system call fails, it returns an error value (often -1) and records a string describing the error in a per-process location. The verb r in sys-print(2) outputs the error string. Werrstr sets the process's error string to s, to allow a function in a module to mimic the error reporting interface of a system call.

SEE ALSO

sys-intro(2), sys-print(2)

SYS-WERRSTR(2 ) Rev:  Thu Feb 15 14:43:26 GMT 2007