Skip to content

Commit

Permalink
registry.c: say which function errored
Browse files Browse the repository at this point in the history
  • Loading branch information
jmroot committed Oct 4, 2024
1 parent be64ebf commit b8e9820
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/registry2.0/registry.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,24 +143,24 @@ 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) {
reg_vacuum(Tcl_GetAssocData(interp, "registry::db_path", NULL));
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);
}
}
Expand Down Expand Up @@ -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) {
Expand All @@ -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)) {
Expand Down

0 comments on commit b8e9820

Please sign in to comment.