From ac3f2684f525f8454736642345384dac2b77dd77 Mon Sep 17 00:00:00 2001 From: Aymeric Wibo Date: Sun, 17 Nov 2024 20:28:19 +0100 Subject: [PATCH] deps: Make error message more explicit --- src/bsys/bob/main.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/bsys/bob/main.c b/src/bsys/bob/main.c index fe6d1411..725b2574 100644 --- a/src/bsys/bob/main.c +++ b/src/bsys/bob/main.c @@ -256,19 +256,16 @@ static int deps(void) { flamingo_val_t* const val = vec->val->vec.elems[i]; if (val->kind != FLAMINGO_VAL_KIND_INST) { - goto uh_oh; + LOG_FATAL("Dependencies vector element must be a instance of the 'Dep' class."); + return -1; } flamingo_val_t* const class = val->inst.class; if (flamingo_cstrcmp(class->name, "Dep", class->name_size) != 0) { - goto uh_oh; + LOG_FATAL("Dependencies vector element must be a instance of the 'Dep' class (not '%.*s').", (int) class->name_size, class->name); + return -1; } - -uh_oh: - - LOG_FATAL("Dependencies vector element must be a instance of the `Dep` class."); - return -1; } return deps_download(vec->val);