1
1
Fork 0
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:
Jason Rhinelander 2020-05-04 12:44:32 -03:00 committed by GitHub
commit 4be7b2c8a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;