mirror of
https://github.com/oxen-io/lokinet
synced 2023-12-14 06:53:00 +01:00
Merge pull request #1253 from notlesh/better-config-error-messages-2020-05-04
Use more user-friendly error messages in config
This commit is contained in:
commit
4be7b2c8a5
|
@ -62,7 +62,7 @@ namespace llarp
|
|||
{
|
||||
// fallback to undeclared handler if available
|
||||
if (not haveUndeclaredHandler)
|
||||
throw std::invalid_argument(stringify("no declared section [", section, "]"));
|
||||
throw std::invalid_argument(stringify("unrecognized section [", section, "]"));
|
||||
else
|
||||
{
|
||||
auto& handler = undItr->second;
|
||||
|
@ -78,7 +78,7 @@ namespace llarp
|
|||
if (defItr == sectionDefinitions.end())
|
||||
{
|
||||
if (not haveUndeclaredHandler)
|
||||
throw std::invalid_argument(stringify("no declared option [", section, "]:", name));
|
||||
throw std::invalid_argument(stringify("unrecognized option [", section, "]:", name));
|
||||
else
|
||||
{
|
||||
auto& handler = undItr->second;
|
||||
|
|
Loading…
Reference in a new issue