| setErrorCount |
(int count) |
yoix.system |
| |
Sets the interpreter's internal error counter to
count,
which should be a non-negative number, and returns the old count.
Whenever an error occurs the interpreter increments an internal counter
and quits when an error limit has been set to a positive number using
setErrorLimit
and the number of errors equals or exceeds that limit.
A zero error limit, which is the default starting value,
tells the interpreter to keep trying no matter how many errors occur.
| |
| Example: |
The program,
import yoix.stdio.*;
import yoix.system.*;
fprintf(stderr, "limit=%d\n", getErrorLimit());
setErrorLimit(2);
fprintf(stderr, "limit=%d\n", getErrorLimit());
fprintf(stderr, "count=%d\n", getErrorCount());
x;
fprintf(stderr, "count=%d\n", getErrorCount());
setErrorCount(0);
fprintf(stderr, "count=%d\n", getErrorCount());
x;
fprintf(stderr, "count=%d\n", getErrorCount());
prints,
limit=0
limit=2
count=0
Error: undefined; Name: x; Line: 8; Source: -stdin-
count=1
count=0
Error: undefined; Name: x; Line: 12; Source: -stdin-
count=1
on standard error.
In this example all statements are executed because the error count
was reset before the interpreter encountered the second error.
| | |
| Return: |
int
| | |
| See Also: |
dumpJavaStack,
dumpStack,
dumpYoixStack,
getErrorCount,
getErrorLimit,
setErrorLimit,
traceInstructions,
traceMethodCalls
|
|
Yoix is a registered trademark of AT&T Inc.
|