From: Jérémie Astor Date: Sun, 15 May 2022 16:44:33 +0000 (+0200) Subject: :art: Improve gack not printing error X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=38445380d1e0428e738784e7990db3c1180d79a9;p=gwion.git :art: Improve gack not printing error --- diff --git a/src/parse/scan1.c b/src/parse/scan1.c index d64c1f66..4f5faf19 100644 --- a/src/parse/scan1.c +++ b/src/parse/scan1.c @@ -684,8 +684,12 @@ ANN static m_bool _scan1_func_def(const Env env, const Func_Def fdef) { --env->scope->depth; env->func = former; if (global) env_pop(env, scope); - if (fdef->base->xid == insert_symbol("@gack") && !fake.weight) - ERR_B(fdef->base->pos, "`@gack` operator not printing anything"); + if (fdef->base->xid == insert_symbol("@gack") && !fake.weight) { + gwerr_basic(_("`@gack` operator does not print anything"), NULL, + _("use `<<<` `>>>` in the function"), env->name, fdef->base->pos, 0); + env->context->error = true; + return GW_ERROR; + } return ret; }