Skip to content

Commit

Permalink
Print detailed error on domain file error
Browse files Browse the repository at this point in the history
  • Loading branch information
blechschmidt committed Jan 21, 2025
1 parent 194bbe2 commit cb49ad2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2296,7 +2296,7 @@ void run()
context.domainfile = fopen(context.cmd_args.domains, "r");
if (context.domainfile == NULL)
{
log_msg(LOG_ERROR, "Failed to open domain file \"%s\".\n", context.cmd_args.domains);
log_msg(LOG_ERROR, "Failed to open domain file \"%s\": %s\n", context.cmd_args.domains, strerror(errno));
clean_exit(EXIT_FAILURE);
}
}
Expand Down Expand Up @@ -2914,7 +2914,7 @@ void parse_cmd(int argc, char **argv)
context.domainfile = fopen(context.cmd_args.domains, "r");
if (context.domainfile == NULL)
{
log_msg(LOG_ERROR, "Failed to open domain file \"%s\".\n", argv[i]);
log_msg(LOG_ERROR, "Failed to open domain file \"%s\": %s.\n", argv[i], strerror(errno));
clean_exit(EXIT_FAILURE);
}
if(fseek(context.domainfile, 0, SEEK_END) != 0)
Expand Down

0 comments on commit cb49ad2

Please sign in to comment.