Merge commit 'origin'
[nedit-bw.git] / EXEC_ERROR.patch
blob1bc8644d5de4f86b8ef6e014a928fddfb065115c
1 ---
3 source/interpret.c | 189 ++++++++++++++++++++++++++---------------------------
4 1 file changed, 96 insertions(+), 93 deletions(-)
6 diff --quilt old/source/interpret.c new/source/interpret.c
7 --- old/source/interpret.c
8 +++ new/source/interpret.c
9 @@ -1374,10 +1374,12 @@ static void addToGlobalSymTab(Symbol *sy
10 GlobalSymTab[idx] = sym;
13 +#define EXEC_ERROR(s1, s2) return execError(s1, s2)
15 #define GET_SYM(s) \
16 do { \
17 if (PC->type != SYM_INST) { \
18 - return execError("Unexpected instruction, expected <symbol>: <%s>", \
19 + EXEC_ERROR("Unexpected instruction, expected <symbol>: <%s>", \
20 instTypeToStr(PC->type)); \
21 } \
22 s = PC->val.sym; \
23 @@ -1387,7 +1389,7 @@ static void addToGlobalSymTab(Symbol *sy
24 #define GET_IMMED(i) \
25 do { \
26 if (PC->type != IMMED_INST) { \
27 - return execError("Unexpected instruction, expected <immediate>: <%s>", \
28 + EXEC_ERROR("Unexpected instruction, expected <immediate>: <%s>", \
29 instTypeToStr(PC->type)); \
30 } \
31 i = PC->val.immed; \
32 @@ -1397,7 +1399,7 @@ static void addToGlobalSymTab(Symbol *sy
33 #define GET_BRANCH(a) \
34 do { \
35 if (PC->type != BRANCH_INST) { \
36 - return execError("Unexpected instruction, expected <branch>: <%s>", \
37 + EXEC_ERROR("Unexpected instruction, expected <branch>: <%s>", \
38 instTypeToStr(PC->type)); \
39 } \
40 a = PC + PC->val.branch; \
41 @@ -1427,7 +1429,7 @@ static void addToGlobalSymTab(Symbol *sy
42 #define POP_CHECK(n) \
43 do { \
44 if (!OK_TO_POP(n)) { \
45 - return execError(StackUnderflowMsg, ""); \
46 + EXEC_ERROR(StackUnderflowMsg, ""); \
47 } \
48 } while (0)
50 @@ -1438,17 +1440,17 @@ static void addToGlobalSymTab(Symbol *sy
51 #define PUSH_CHECK(n) \
52 do { \
53 if (!OK_TO_PUSH(n)) { \
54 - return execError(StackOverflowMsg, ""); \
55 + EXEC_ERROR(StackOverflowMsg, ""); \
56 } \
57 } while (0)
59 #define PEEK_CHECK(n) \
60 do { \
61 if (!OK_TO_POP((n) + 1)) { \
62 - return execError(StackUnderflowMsg, ""); \
63 + EXEC_ERROR(StackUnderflowMsg, ""); \
64 } \
65 if (!OK_TO_PUSH(-(n))) { \
66 - return execError(StackOverflowMsg, ""); \
67 + EXEC_ERROR(StackOverflowMsg, ""); \
68 } \
69 } while (0)
71 @@ -1477,10 +1479,10 @@ static void addToGlobalSymTab(Symbol *sy
72 __int = dataVal.val.n; \
73 } else if (dataVal.tag == STRING_TAG) { \
74 if (!StringToNum(dataVal.val.str.rep, &__int)) {\
75 - return execError(StringToNumberMsg, dataVal.val.str.rep); \
76 + EXEC_ERROR(StringToNumberMsg, dataVal.val.str.rep); \
77 } \
78 } else { \
79 - return execError("incompatible type in integer context: <%s>", \
80 + EXEC_ERROR("incompatible type in integer context: <%s>", \
81 tagToStr(dataVal.tag)); \
82 } \
83 number = __int; \
84 @@ -1494,7 +1496,7 @@ static void addToGlobalSymTab(Symbol *sy
85 } else if (dataVal.tag == INT_TAG) { \
86 __str = AllocStringOfNumber(dataVal.val.n); \
87 } else { \
88 - return execError("incompatible type in string context: <%s>", \
89 + EXEC_ERROR("incompatible type in string context: <%s>", \
90 tagToStr(dataVal.tag)); \
91 } \
92 string = __str; \
93 @@ -1592,7 +1594,7 @@ static int pushSymVal(void)
94 nArgs = FP_GET_ARG_COUNT(FrameP);
95 argNum = s->value.val.n;
96 if (argNum >= nArgs) {
97 - return execError("referenced undefined argument: %s", s->name);
98 + EXEC_ERROR("referenced undefined argument: %s", s->name);
100 if (argNum == N_ARGS_ARG_SYM) {
101 symVal.tag = INT_TAG;
102 @@ -1605,12 +1607,12 @@ static int pushSymVal(void)
103 char *errMsg;
104 if (!(s->value.val.subr)(FocusWindow, NULL, 0,
105 &symVal, &errMsg)) {
106 - return execError(errMsg, s->name);
107 + EXEC_ERROR(errMsg, s->name);
109 } else
110 - return execError("reading non-variable: %s", s->name);
111 + EXEC_ERROR("reading non-variable: %s", s->name);
112 if (symVal.tag == NO_TAG && !inTypeOfMode) {
113 - return execError("variable not set: %s", s->name);
114 + EXEC_ERROR("variable not set: %s", s->name);
117 PUSH(symVal);
118 @@ -1650,8 +1652,8 @@ static int pushArgVal(void)
119 --argNum;
120 nArgs = FP_GET_ARG_COUNT(FrameP);
121 if (argNum >= nArgs || argNum < 0) {
122 - return execError("referenced undefined argument: $args[%s]",
123 - longAsStr(argNum + 1));
124 + EXEC_ERROR("referenced undefined argument: $args[%s]",
125 + longAsStr(argNum + 1));
127 PUSH(FP_GET_ARG_N(FrameP, argNum));
128 return STAT_OK;
129 @@ -1690,7 +1692,7 @@ static int pushArgArray(void)
130 argVal = FP_GET_ARG_N(FrameP, argNum);
131 if (!ArrayInsert(argArray, AllocStringOfNumber(argNum + 1),
132 &argVal)) {
133 - return(execError("argument array insertion failure", NULL));
134 + EXEC_ERROR("argument array insertion failure", NULL);
138 @@ -1726,7 +1728,7 @@ static int pushArraySymVal(void)
139 dataPtr = &sym->value;
141 else {
142 - return execError("assigning to non-lvalue array or non-array: %s", sym->name);
143 + EXEC_ERROR("assigning to non-lvalue array or non-array: %s", sym->name);
146 if (initEmpty && dataPtr->tag == NO_TAG) {
147 @@ -1735,7 +1737,7 @@ static int pushArraySymVal(void)
150 if (dataPtr->tag == NO_TAG && !inTypeOfMode) {
151 - return execError("variable not set: %s", sym->name);
152 + EXEC_ERROR("variable not set: %s", sym->name);
155 PUSH(*dataPtr);
156 @@ -1828,7 +1830,7 @@ static int anonArrayNextVal(void)
158 sprintf(numString, "%d", nextIndex);
159 if (!ArrayInsert(&anonArray, AllocStringCpy(numString), &exprVal)) {
160 - return(execError("array insertion failure", NULL));
161 + EXEC_ERROR("array insertion failure", NULL);
164 /* we need to increment the index for next time */
165 @@ -1880,7 +1882,7 @@ static int anonArrayIndexVal(void)
168 if (!ArrayInsert(&anonArray, keyString, &exprVal)) {
169 - return(execError("array insertion failure", NULL));
170 + EXEC_ERROR("array insertion failure", NULL);
173 /* push the default next index value first, then the array */
174 @@ -1971,7 +1973,7 @@ static int namedArg1orN(Boolean isFirst)
175 /* if our index is numeric (or can be converted to a number) we must
176 change the next index value */
177 if (nDim == 1 && StringToNum(keyString, &index)) {
178 - return execError("named argument name must not be numeric", NULL);
179 + EXEC_ERROR("named argument name must not be numeric", NULL);
182 if (isFirst) {
183 @@ -1985,7 +1987,7 @@ static int namedArg1orN(Boolean isFirst)
186 if (!ArrayInsert(&argsArray, keyString, &exprVal)) {
187 - return(execError("named argument insertion failure", NULL));
188 + EXEC_ERROR("named argument insertion failure", NULL);
191 /* and (re)push the array */
192 @@ -2033,13 +2035,13 @@ static int assign(void)
194 if (sym->type != GLOBAL_SYM && sym->type != LOCAL_SYM) {
195 if (sym->type == ARG_SYM) {
196 - return execError("assignment to function argument: %s", sym->name);
197 + EXEC_ERROR("assignment to function argument: %s", sym->name);
199 else if (sym->type == PROC_VALUE_SYM) {
200 - return execError("assignment to read-only variable: %s", sym->name);
201 + EXEC_ERROR("assignment to read-only variable: %s", sym->name);
203 else {
204 - return execError("assignment to non-variable: %s", sym->name);
205 + EXEC_ERROR("assignment to non-variable: %s", sym->name);
209 @@ -2155,13 +2157,13 @@ static int add(void)
210 rightIter = arrayIterateNext(rightIter);
212 if (!insertResult) {
213 - return(execError("array insertion failure", NULL));
214 + EXEC_ERROR("array insertion failure", NULL);
217 PUSH(resultArray);
219 else {
220 - return(execError("can't mix math with arrays and non-arrays", NULL));
221 + EXEC_ERROR("can't mix math with arrays and non-arrays", NULL);
224 else {
225 @@ -2169,7 +2171,7 @@ static int add(void)
226 POP_INT(n1);
227 PUSH_INT(n1 + n2);
229 - return(STAT_OK);
230 + return STAT_OK;
234 @@ -2221,13 +2223,13 @@ static int subtract(void)
235 leftIter = arrayIterateNext(leftIter);
237 if (!insertResult) {
238 - return(execError("array insertion failure", NULL));
239 + EXEC_ERROR("array insertion failure", NULL);
242 PUSH(resultArray);
244 else {
245 - return(execError("can't mix math with arrays and non-arrays", NULL));
246 + EXEC_ERROR("can't mix math with arrays and non-arrays", NULL);
249 else {
250 @@ -2235,7 +2237,7 @@ static int subtract(void)
251 POP_INT(n1);
252 PUSH_INT(n1 - n2);
254 - return(STAT_OK);
255 + return STAT_OK;
259 @@ -2262,7 +2264,7 @@ static int divide(void)
260 POP_INT(n2);
261 POP_INT(n1);
262 if (n2 == 0) {
263 - return execError("division by zero", "");
264 + EXEC_ERROR("division by zero", "");
266 PUSH_INT(n1 / n2);
267 return STAT_OK;
268 @@ -2278,7 +2280,7 @@ static int modulo(void)
269 POP_INT(n2);
270 POP_INT(n1);
271 if (n2 == 0) {
272 - return execError("modulo by zero", "");
273 + EXEC_ERROR("modulo by zero", "");
275 PUSH_INT(n1 % n2);
276 return STAT_OK;
277 @@ -2359,11 +2361,11 @@ static int eq(void)
280 else {
281 - return(execError("incompatible types to compare", NULL));
282 + EXEC_ERROR("incompatible types to compare", NULL);
284 v1.tag = INT_TAG;
285 PUSH(v1);
286 - return(STAT_OK);
287 + return STAT_OK;
290 /* negated eq() call */
291 @@ -2416,13 +2418,13 @@ static int bitAnd(void)
292 rightIter = arrayIterateNext(rightIter);
294 if (!insertResult) {
295 - return(execError("array insertion failure", NULL));
296 + EXEC_ERROR("array insertion failure", NULL);
299 PUSH(resultArray);
301 else {
302 - return(execError("can't mix math with arrays and non-arrays", NULL));
303 + EXEC_ERROR("can't mix math with arrays and non-arrays", NULL);
306 else {
307 @@ -2430,7 +2432,7 @@ static int bitAnd(void)
308 POP_INT(n1);
309 PUSH_INT(n1 & n2);
311 - return(STAT_OK);
312 + return STAT_OK;
316 @@ -2487,13 +2489,13 @@ static int bitOr(void)
317 rightIter = arrayIterateNext(rightIter);
319 if (!insertResult) {
320 - return(execError("array insertion failure", NULL));
321 + EXEC_ERROR("array insertion failure", NULL);
324 PUSH(resultArray);
326 else {
327 - return(execError("can't mix math with arrays and non-arrays", NULL));
328 + EXEC_ERROR("can't mix math with arrays and non-arrays", NULL);
331 else {
332 @@ -2501,7 +2503,7 @@ static int bitOr(void)
333 POP_INT(n1);
334 PUSH_INT(n1 | n2);
336 - return(STAT_OK);
337 + return STAT_OK;
340 static int and(void)
341 @@ -2601,7 +2603,7 @@ static int concatenateNwithSep(int nVals
342 len += value.val.str.len;
344 else {
345 - return execError("incompatible type in string context: <%s>",
346 + EXEC_ERROR("incompatible type in string context: <%s>",
347 tagToStr(value.tag));
350 @@ -2723,7 +2725,7 @@ static int callSubroutineFromSymbol(Symb
351 PreemptRequest = False;
352 if (!sym->value.val.subr(FocusWindow, StackP,
353 nArgs, &result, &errMsg))
354 - return execError(errMsg, sym->name);
355 + EXEC_ERROR(errMsg, sym->name);
356 PUSH_RET_VAL(result);
357 return PreemptRequest ? STAT_PREEMPT : STAT_OK;
359 @@ -2758,8 +2760,7 @@ static int callSubroutineFromSymbol(Symb
360 Window win;
362 if (haveNamedArgs) {
363 - return execError(
364 - "%s action routine called with named argument array",
365 + EXEC_ERROR("%s action routine called with named argument array",
366 sym->name);
369 @@ -2795,7 +2796,7 @@ static int callSubroutineFromSymbol(Symb
372 /* Calling a non subroutine symbol */
373 - return execError("%s is not a function or subroutine", sym->name);
374 + EXEC_ERROR("%s is not a function or subroutine", sym->name);
378 @@ -2865,7 +2866,7 @@ static int callSubroutineUnpackArray(voi
379 POP(argArray);
381 if (argArray.tag != ARRAY_TAG) {
382 - return execError("argument array call made with non-array value", NULL);
383 + EXEC_ERROR("argument array call made with non-array value", NULL);
386 if (haveNamedArgs) {
387 @@ -2899,7 +2900,7 @@ static int callSubroutineUnpackArray(voi
389 else {
390 if (!ArrayInsert(&dvArray, iter->key, &dvEntry)) {
391 - return(execError("array copy failed", NULL));
392 + EXEC_ERROR("array copy failed", NULL);
396 @@ -2974,7 +2975,7 @@ int OverlayRoutineFromProg(Program *prog
398 static int fetchRetVal(void)
400 - return execError("internal error: frv", NULL);
401 + EXEC_ERROR("internal error: frv", NULL);
404 /* see comments for returnValOrNone() */
405 @@ -3117,17 +3118,17 @@ int ArrayCopy(DataValue *dstArray, DataV
406 return(errNum);
408 if (!ArrayInsert(dstArray, srcIter->key, &tmpArray)) {
409 - return(execError("array copy failed", NULL));
410 + return STAT_ERROR;
413 else {
414 if (!ArrayInsert(dstArray, srcIter->key, &srcIter->value)) {
415 - return(execError("array copy failed", NULL));
416 + return STAT_ERROR;
419 srcIter = arrayIterateNext(srcIter);
421 - return(STAT_OK);
422 + return STAT_OK;
426 @@ -3147,7 +3148,7 @@ static int makeArrayKeyFromArgs(int nArg
427 if (len > 0) {
428 return len;
430 - return(STAT_OK);
431 + return STAT_OK;
435 @@ -3464,23 +3465,24 @@ static int arrayRef(void)
436 POP(srcArray);
437 if (srcArray.tag == ARRAY_TAG) {
438 if (!ArrayGet(&srcArray, keyString, &valueItem)) {
439 - return(execError("referenced array value not in array: %s", keyString));
440 + EXEC_ERROR("referenced array value not in array: %s",
441 + keyString);
443 PUSH(valueItem);
444 - return(STAT_OK);
445 + return STAT_OK;
447 else {
448 - return(execError("operator [] on non-array", NULL));
449 + EXEC_ERROR("operator [] on non-array", NULL);
452 else {
453 POP(srcArray);
454 if (srcArray.tag == ARRAY_TAG) {
455 PUSH_INT(ArraySize(&srcArray));
456 - return(STAT_OK);
457 + return STAT_OK;
459 else {
460 - return(execError("operator [] on non-array", NULL));
461 + EXEC_ERROR("operator [] on non-array", NULL);
465 @@ -3517,7 +3519,7 @@ static int arrayAssign(void)
466 POP(dstArray);
468 if (dstArray.tag != ARRAY_TAG && dstArray.tag != NO_TAG) {
469 - return(execError("cannot assign array element of non-array", NULL));
470 + EXEC_ERROR("cannot assign array element of non-array", NULL);
472 if (srcValue.tag == ARRAY_TAG) {
473 DataValue arrayCopyValue;
474 @@ -3529,13 +3531,13 @@ static int arrayAssign(void)
477 if (ArrayInsert(&dstArray, keyString, &srcValue)) {
478 - return(STAT_OK);
479 + return STAT_OK;
481 else {
482 - return(execError("array member allocation failure", NULL));
483 + EXEC_ERROR("array member allocation failure", NULL);
486 - return(execError("empty operator []", NULL));
487 + EXEC_ERROR("empty operator []", NULL);
491 @@ -3573,20 +3575,21 @@ static int arrayRefAndAssignSetup(void)
492 PEEK(srcArray, nDim);
493 if (srcArray.tag == ARRAY_TAG) {
494 if (!ArrayGet(&srcArray, keyString, &valueItem)) {
495 - return(execError("referenced array value not in array: %s", keyString));
496 + EXEC_ERROR("referenced array value not in array: %s",
497 + keyString);
499 PUSH(valueItem);
500 if (binaryOp) {
501 PUSH(moveExpr);
503 - return(STAT_OK);
504 + return STAT_OK;
506 else {
507 - return(execError("operator [] on non-array", NULL));
508 + EXEC_ERROR("operator [] on non-array", NULL);
511 else {
512 - return(execError("array[] not an lvalue", NULL));
513 + EXEC_ERROR("array[] not an lvalue", NULL);
517 @@ -3619,16 +3622,16 @@ static int beginArrayIter(void)
518 iteratorValPtr = &FP_GET_SYM_VAL(FrameP, iterator);
520 else {
521 - return(execError("bad temporary iterator: %s", iterator->name));
522 + EXEC_ERROR("bad temporary iterator: %s", iterator->name);
525 iteratorValPtr->tag = INT_TAG;
526 if (arrayVal.tag != ARRAY_TAG) {
527 - return(execError("can't iterate non-array", NULL));
528 + EXEC_ERROR("can't iterate non-array", NULL);
531 iteratorValPtr->val.arrayPtr = arrayIterateFirst(&arrayVal);
532 - return(STAT_OK);
533 + return STAT_OK;
537 @@ -3685,7 +3688,7 @@ static int arrayIter(void)
538 keyValPtr = &(keySym->value);
540 else {
541 - return(execError("can't assign to: %s", keySym->name));
542 + EXEC_ERROR("can't assign to: %s", keySym->name);
544 keyValPtr->tag = NO_TAG;
546 @@ -3697,7 +3700,7 @@ static int arrayIter(void)
547 valPtr = &(valSym->value);
549 else {
550 - return(execError("can't assign to: %s", valSym->name));
551 + EXEC_ERROR("can't assign to: %s", valSym->name);
553 valPtr->tag = NO_TAG;
555 @@ -3706,7 +3709,7 @@ static int arrayIter(void)
556 iteratorValPtr = &FP_GET_SYM_VAL(FrameP, iterator);
558 else {
559 - return(execError("bad temporary iterator: %s", iterator->name));
560 + EXEC_ERROR("bad temporary iterator: %s", iterator->name);
563 thisEntry = iteratorValPtr->val.arrayPtr;
564 @@ -3727,7 +3730,7 @@ static int arrayIter(void)
565 else {
566 JUMP(branchAddr);
568 - return(STAT_OK);
569 + return STAT_OK;
573 @@ -3755,21 +3758,21 @@ static int beginArrayIterArray(void)
574 iteratorValPtr = &FP_GET_SYM_VAL(FrameP, iterator);
576 else {
577 - return(execError("bad temporary iterator: %s", iterator->name));
578 + EXEC_ERROR("bad temporary iterator: %s", iterator->name);
581 if (nDims < 0) {
582 - return(execError("bad multi dimension", NULL));
583 + EXEC_ERROR("bad multi dimension", NULL);
586 iteratorValPtr->tag = INT_TAG;
587 if (arrayVal.tag != ARRAY_TAG) {
588 - return(execError("can't iterate non-array", NULL));
589 + EXEC_ERROR("can't iterate non-array", NULL);
592 iteratorValPtr->val.arrayPtr = arrayIterateFirst(&arrayVal);
594 - return(STAT_OK);
595 + return STAT_OK;
598 static int countDim(const char *key)
599 @@ -3865,7 +3868,7 @@ static int arrayIterArray(void)
600 keyArrayPtr = &(keyArraySym->value);
602 else {
603 - return(execError("can't assign to: %s", keyArraySym->name));
604 + EXEC_ERROR("can't assign to: %s", keyArraySym->name);
606 keyArrayPtr->tag = ARRAY_TAG;
607 keyArrayPtr->val.arrayPtr = NULL;
608 @@ -3878,7 +3881,7 @@ static int arrayIterArray(void)
609 valPtr = &valSym->value;
611 else {
612 - return(execError("can't assign to: %s", valSym->name));
613 + EXEC_ERROR("can't assign to: %s", valSym->name);
615 valPtr->tag = NO_TAG;
617 @@ -3887,7 +3890,7 @@ static int arrayIterArray(void)
618 iteratorValPtr = &FP_GET_SYM_VAL(FrameP, iterator);
620 else {
621 - return(execError("bad temporary iterator: %s", iterator->name));
622 + EXEC_ERROR("bad temporary iterator: %s", iterator->name);
625 thisEntry = iteratorValPtr->val.arrayPtr;
626 @@ -3908,7 +3911,7 @@ static int arrayIterArray(void)
628 /* set keys */
629 if (!splitKeyIntoArray(thisEntry->key, keyArrayPtr)) {
630 - return(execError("can't split key: %s", thisEntry->key));
631 + EXEC_ERROR("can't split key: %s", thisEntry->key);
634 if (withVal) {
635 @@ -3952,7 +3955,7 @@ static int inArray(void)
637 POP(theArray);
638 if (theArray.tag != ARRAY_TAG) {
639 - return(execError("operator in on non-array", NULL));
640 + EXEC_ERROR("operator in on non-array", NULL);
642 PEEK(leftArray, 0);
643 if (leftArray.tag == ARRAY_TAG) {
644 @@ -3973,7 +3976,7 @@ static int inArray(void)
647 PUSH_INT(inResult);
648 - return(STAT_OK);
649 + return STAT_OK;
653 @@ -4016,15 +4019,15 @@ static int deleteArrayElement(void)
656 else {
657 - return(execError("attempt to delete from non-array", NULL));
658 + EXEC_ERROR("attempt to delete from non-array", NULL);
660 - return(STAT_OK);
661 + return STAT_OK;
664 static int typeOfIn(void)
666 if (inTypeOfMode) {
667 - return(execError("I'm already in typeof-mode", NULL));
668 + EXEC_ERROR("I'm already in typeof-mode", NULL);
671 inTypeOfMode = 1;
672 @@ -4038,7 +4041,7 @@ static int typeOfOut(void)
673 DataValue retVal;
675 if (!inTypeOfMode) {
676 - return(execError("I'm not in typeof-mode", NULL));
677 + EXEC_ERROR("I'm not in typeof-mode", NULL);
680 inTypeOfMode = 0;
681 @@ -4089,7 +4092,7 @@ static int arrayAssignNext(void)
682 POP(dstArray);
684 if (dstArray.tag != ARRAY_TAG && dstArray.tag != NO_TAG) {
685 - return execError("cannot assign array element of non-array", NULL);
686 + EXEC_ERROR("cannot assign array element of non-array", NULL);
689 if (srcValue.tag == ARRAY_TAG) {
690 @@ -4105,7 +4108,7 @@ static int arrayAssignNext(void)
691 keyString = AllocStringOfNumber(arrayMaxNumIdx(&dstArray) + 1);
693 if (!ArrayInsert(&dstArray, keyString, &srcValue)) {
694 - return execError("array member allocation failure", NULL);
695 + EXEC_ERROR("array member allocation failure", NULL);
698 return STAT_OK;
699 @@ -4129,7 +4132,7 @@ static int arrayNextNumIdx(void)
701 POP(srcArray);
702 if (srcArray.tag != ARRAY_TAG) {
703 - return execError("operator [@] on non-array", NULL);
704 + EXEC_ERROR("operator [@] on non-array", NULL);
707 PUSH_INT(arrayMaxNumIdx(&srcArray) + 1);
708 @@ -4144,9 +4147,9 @@ static int arrayNextNumIdx(void)
709 static int errCheck(const char *s)
711 if (errno == EDOM)
712 - return execError("%s argument out of domain", s);
713 + EXEC_ERROR("%s argument out of domain", s);
714 else if (errno == ERANGE)
715 - return execError("%s result out of range", s);
716 + EXEC_ERROR("%s result out of range", s);
717 else
718 return STAT_OK;