From b8e9820a7ee1ee1dce1e5e34373fb90561bafd4f Mon Sep 17 00:00:00 2001 From: Joshua Root Date: Sat, 5 Oct 2024 05:15:27 +1000 Subject: [PATCH] registry.c: say which function errored --- src/registry2.0/registry.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/registry2.0/registry.c b/src/registry2.0/registry.c index 64a0b5ce74..de6dbcf5d1 100644 --- a/src/registry2.0/registry.c +++ b/src/registry2.0/registry.c @@ -143,7 +143,7 @@ static void delete_reg(ClientData reg, Tcl_Interp* interp) { reg_error error; if (((reg_registry*)reg)->status & reg_attached) { if (reg_optimize((reg_registry*)reg, &error) == 0) { - fprintf(stderr, "%s\n", error.description); + fprintf(stderr, "reg_optimize: %s\n", error.description); reg_error_destruct(&error); } if (Tcl_GetAssocData(interp, "registry::needs_vacuum", NULL) != NULL) { @@ -151,16 +151,16 @@ static void delete_reg(ClientData reg, Tcl_Interp* interp) { Tcl_DeleteAssocData(interp, "registry::needs_vacuum"); } if (reg_checkpoint((reg_registry*)reg, &error) == 0) { - fprintf(stderr, "%s\n", error.description); + fprintf(stderr, "reg_checkpoint: %s\n", error.description); reg_error_destruct(&error); } if (!registry_tcl_detach(interp, (reg_registry*)reg, &error)) { - fprintf(stderr, "%s", error.description); + fprintf(stderr, "registry_tcl_detach: %s", error.description); reg_error_destruct(&error); } } if (!reg_close((reg_registry*)reg, &error)) { - fprintf(stderr, "%s", error.description); + fprintf(stderr, "reg_close: %s", error.description); reg_error_destruct(&error); } } @@ -245,7 +245,7 @@ static int registry_close(ClientData clientData UNUSED, Tcl_Interp* interp, } else { reg_error error; if (reg_optimize(reg, &error) == 0) { - fprintf(stderr, "%s\n", error.description); + fprintf(stderr, "reg_optimize: %s\n", error.description); reg_error_destruct(&error); } if (Tcl_GetAssocData(interp, "registry::needs_vacuum", NULL) != NULL) { @@ -254,7 +254,7 @@ static int registry_close(ClientData clientData UNUSED, Tcl_Interp* interp, } /* Not really anything we can do if this fails. */ if (reg_checkpoint(reg, &error) == 0) { - fprintf(stderr, "%s\n", error.description); + fprintf(stderr, "reg_checkpoint: %s\n", error.description); reg_error_destruct(&error); } if (registry_tcl_detach(interp, reg, &error)) {