mirror of
https://github.com/PancakeTAS/lsfg-vk.git
synced 2025-10-30 07:01:10 +00:00
colon correctness
This commit is contained in:
parent
3526dde26c
commit
5e68315c2f
2 changed files with 4 additions and 4 deletions
|
|
@ -98,14 +98,14 @@ bool Config::loadAndWatchConfig(const std::string& file) {
|
||||||
try {
|
try {
|
||||||
const int fd = inotify_init();
|
const int fd = inotify_init();
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
throw std::runtime_error("Failed to initialize inotify\n"
|
throw std::runtime_error("Failed to initialize inotify:\n"
|
||||||
"- " + std::string(strerror(errno)));
|
"- " + std::string(strerror(errno)));
|
||||||
|
|
||||||
const int wd = inotify_add_watch(fd, file.c_str(), IN_MODIFY | IN_CLOSE_WRITE);
|
const int wd = inotify_add_watch(fd, file.c_str(), IN_MODIFY | IN_CLOSE_WRITE);
|
||||||
if (wd < 0) {
|
if (wd < 0) {
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
throw std::runtime_error("Failed to add inotify watch for " + file + "\n"
|
throw std::runtime_error("Failed to add inotify watch for " + file + ":\n"
|
||||||
"- " + std::string(strerror(errno)));
|
"- " + std::string(strerror(errno)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -119,7 +119,7 @@ bool Config::loadAndWatchConfig(const std::string& file) {
|
||||||
inotify_rm_watch(fd, wd);
|
inotify_rm_watch(fd, wd);
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
throw std::runtime_error("Error reading inotify event\n"
|
throw std::runtime_error("Error reading inotify event:\n"
|
||||||
"- " + std::string(strerror(errno)));
|
"- " + std::string(strerror(errno)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ namespace {
|
||||||
try {
|
try {
|
||||||
Config::activeConf = Config::getConfig(name);
|
Config::activeConf = Config::getConfig(name);
|
||||||
} catch (const std::exception& e) {
|
} catch (const std::exception& e) {
|
||||||
std::cerr << "lsfg-vk: The configuration for " << name << " is invalid, exiting.\n";
|
std::cerr << "lsfg-vk: The configuration for " << name << " is invalid, exiting:\n";
|
||||||
std::cerr << e.what() << '\n';
|
std::cerr << e.what() << '\n';
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue