Print call stack if an error occurs in a user-defined function.

This commit is contained in:
Dianne Skoll
2022-03-25 14:03:06 -04:00
parent 10f5802069
commit df9ef6e13a
6 changed files with 35 additions and 8 deletions
+4
View File
@@ -316,7 +316,11 @@ int CallUserFunc(char const *name, int nargs, ParsePtr p)
/* Skip the opening bracket, if there's one */
while (isempty(*s)) s++;
if (*s == BEG_OF_EXPR) s++;
push_call(f->filename, f->name, f->lineno);
h = Evaluate(&s, f->locals, p);
if (h == OK) {
pop_call();
}
f->IsActive = 0;
DestroyLocalVals(f);
if (DebugFlag &DB_PRTEXPR) {