Skip to content

Commit

Permalink
Fix bad formatting of line number when a service fails to load
Browse files Browse the repository at this point in the history
It was adding "line X" directly after the service file path without any
kind of separation.
  • Loading branch information
JamiKettunen authored and davmac314 committed Oct 21, 2024
1 parent f883bcb commit ef2ce60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The following people (in alphabetical order) have contributed:
* Edd Barrett - Testing, documentation.
* Fabien Poussin - Code, services, documentation.
* James Knippes - Code
* Jami Kettunen - Code
* Mobin Aydinfar - Code, documentation, CI
* Oliver Amann - Code, testing, documentation
* Locria Cyber - Code, documentation
Expand Down
4 changes: 2 additions & 2 deletions src/includes/service.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,12 @@ inline void log_service_load_failure(service_description_exc &exc)
if (exc.input_pos.get_line_num() != (unsigned)-1) {
if (exc.setting_name == nullptr) {
log(loglevel_t::ERROR, "Error in service description for '", exc.service_name,
"' (file ", exc.input_pos.get_file_name(), "line ", exc.input_pos.get_line_num(), "): ",
"' (file ", exc.input_pos.get_file_name(), ", line ", exc.input_pos.get_line_num(), "): ",
exc.exc_description);
}
else {
log(loglevel_t::ERROR, "Error in service description for '", exc.service_name, "': setting '", exc.setting_name, "' "
"(file ", exc.input_pos.get_file_name(), "line ", exc.input_pos.get_line_num(), "): ",
"(file ", exc.input_pos.get_file_name(), ", line ", exc.input_pos.get_line_num(), "): ",
exc.exc_description);
}
}
Expand Down

0 comments on commit ef2ce60

Please sign in to comment.