mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-01 23:35:41 +00:00
improve error messages
This commit is contained in:
parent
6731b3e977
commit
461fb5d896
@ -367,7 +367,7 @@ void TConsole::Command_Settings(const std::string&, const std::vector<std::strin
|
|||||||
settings help displays this help
|
settings help displays this help
|
||||||
settings list lists all settings
|
settings list lists all settings
|
||||||
settings get <category> <setting> prints current value of specified setting
|
settings get <category> <setting> prints current value of specified setting
|
||||||
settings set <categoty> <setting> <value> sets specified setting to value
|
settings set <category> <setting> <value> sets specified setting to value
|
||||||
)";
|
)";
|
||||||
|
|
||||||
if (args.size() == 0) {
|
if (args.size() == 0) {
|
||||||
@ -412,8 +412,8 @@ void TConsole::Command_Settings(const std::string&, const std::vector<std::strin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (args.front() == "set") {
|
} else if (args.front() == "set") {
|
||||||
if (args.size() == 1) {
|
if (args.size() <= 3) {
|
||||||
beammp_errorf("'settings set' needs at least two arguments!");
|
beammp_errorf("'settings set' needs at least three arguments!");
|
||||||
|
|
||||||
Application::Console().WriteRaw("BeamMP-Server Console: " + std::string(sHelpString));
|
Application::Console().WriteRaw("BeamMP-Server Console: " + std::string(sHelpString));
|
||||||
return;
|
return;
|
||||||
@ -450,8 +450,7 @@ void TConsole::Command_Settings(const std::string&, const std::vector<std::strin
|
|||||||
keyType);
|
keyType);
|
||||||
|
|
||||||
} catch (std::logic_error& e) {
|
} catch (std::logic_error& e) {
|
||||||
beammp_errorf("Error when setting key.");
|
beammp_errorf("Exception when setting settings key via console: {}", e.what());
|
||||||
beammp_debugf("Exception when setting settings key via console: {}", e.what());
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user