mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-06-26 12:27:51 +02:00
Fix exceptions referenced in #1287
This commit is contained in:
@ -88,7 +88,7 @@ int CommandArgsParser::parse(int argc, char* argv[]) {
|
||||
try {
|
||||
carg.ival = std::stoi(arg);
|
||||
}
|
||||
catch (std::exception e) {
|
||||
catch (const std::exception& e) {
|
||||
printf("Invalid argument, failed to parse integer\n");
|
||||
showHelp();
|
||||
return -1;
|
||||
@ -98,7 +98,7 @@ int CommandArgsParser::parse(int argc, char* argv[]) {
|
||||
try {
|
||||
carg.fval = std::stod(arg);
|
||||
}
|
||||
catch (std::exception e) {
|
||||
catch (const std::exception& e) {
|
||||
printf("Invalid argument, failed to parse float\n");
|
||||
showHelp();
|
||||
return -1;
|
||||
|
@ -36,8 +36,8 @@ void ConfigManager::load(json def, bool lock) {
|
||||
file >> conf;
|
||||
file.close();
|
||||
}
|
||||
catch (std::exception e) {
|
||||
flog::error("Config file '{0}' is corrupted, resetting it", path);
|
||||
catch (const std::exception& e) {
|
||||
flog::error("Config file '{}' is corrupted, resetting it: {}", path, e.what());
|
||||
conf = def;
|
||||
save(false);
|
||||
}
|
||||
|
@ -320,7 +320,7 @@ namespace net {
|
||||
}
|
||||
entry.handler(std::move(client), entry.ctx);
|
||||
}
|
||||
catch (std::exception e) {
|
||||
catch (const std::exception& e) {
|
||||
listening = false;
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user