Don't use repeated DBG() macros. Instead, wrap everything in a conditional

This commit is contained in:
Dianne Skoll
2025-05-09 17:17:37 -04:00
parent 71b3564c03
commit a50f40d652

View File

@@ -1312,28 +1312,36 @@ static int FCatch(expr_node *node, Value *locals, Value *ans, int *nonconst)
SuppressErrorOutputInCatch = old_suppress;
if (r == OK) {
DBG(PUT(PrintValue(ans, NULL)));
DBG(PUT(", ?) => "));
DBG(PUT(PrintValue(ans, NULL)));
DBG(OUT());
if (DebugFlag & DB_PRTEXPR) {
PUT(PrintValue(ans, NULL));
PUT(", ?) => ");
PUT(PrintValue(ans, NULL));
OUT();
}
return r;
}
DBG(PUT("*"));
DBG(PUT(GetErr(r)));
DBG(PUT("*, "));
if (DebugFlag & DB_PRTEXPR) {
PUT("*");
PUT(GetErr(r));
PUT("*, ");
}
r = evaluate_expr_node(cur->sibling, locals, ans, nonconst);
if (r == OK) {
DBG(PUT(PrintValue(ans, NULL)));
DBG(PUT(") => "));
DBG(PUT(PrintValue(ans, NULL)));
DBG(OUT());
if (DebugFlag & DB_PRTEXPR) {
PUT(PrintValue(ans, NULL));
PUT(") => ");
PUT(PrintValue(ans, NULL));
OUT();
}
return r;
}
DBG(PUT("*"));
DBG(PUT(GetErr(r)));
DBG(PUT("*) => "));
DBG(PUT(GetErr(r)));
DBG(OUT());
if (DebugFlag & DB_PRTEXPR) {
PUT("*");
PUT(GetErr(r));
PUT("*) => ");
PUT(GetErr(r));
OUT();
}
return r;
}
/***************************************************************/