From 5919fc6f47cf617aa2b4e0da9985ace304901e9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucca=20Jim=C3=A9nez=20K=C3=B6nings?= Date: Wed, 26 Jun 2024 13:38:07 +0200 Subject: [PATCH] improve acl error message consistency --- src/Settings.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Settings.cpp b/src/Settings.cpp index 7ab0c2d..b5692a7 100644 --- a/src/Settings.cpp +++ b/src/Settings.cpp @@ -116,7 +116,7 @@ Settings::SettingsAccessControl Settings::getConsoleInputAccessMapping(const Com if (!acl_map->contains(keyName)) { throw std::logic_error { "Unknown key name accessed in Settings::getConsoleInputAccessMapping" }; } else if (acl_map->at(keyName).second == SettingsAccessMask::NO_ACCESS) { - throw std::logic_error { "Setting '" + keyName.Category + " > " + keyName.Key + "' is not accessible from within the runtime!" }; + throw std::logic_error { "Setting '" + keyName.Category + "::" + keyName.Key + "' is not accessible from within the runtime!" }; } return acl_map->at(keyName); } @@ -126,9 +126,9 @@ void Settings::setConsoleInputAccessMapping(const ComposedKey& keyName, const st if (!acl_map->contains(keyName)) { throw std::logic_error { "Unknown key name accessed in Settings::setConsoleInputAccessMapping" }; } else if (acl_map->at(keyName).second == SettingsAccessMask::NO_ACCESS) { - throw std::logic_error { "Setting '" + keyName.Category + " > " + keyName.Key + "' is not accessible from within the runtime!" }; + throw std::logic_error { "Setting '" + keyName.Category + "::" + keyName.Key + "' is not accessible from within the runtime!" }; } else if (acl_map->at(keyName).second == SettingsAccessMask::READ_ONLY) { - throw std::logic_error { "Setting '" + keyName.Category + " > " + keyName.Key + "' is not writeable from within the runtime!" }; + throw std::logic_error { "Setting '" + keyName.Category + "::" + keyName.Key + "' is not writeable from within the runtime!" }; } Key key = acl_map->at(keyName).first; @@ -145,9 +145,9 @@ void Settings::setConsoleInputAccessMapping(const ComposedKey& keyName, int valu if (!acl_map->contains(keyName)) { throw std::logic_error { "Unknown key name accessed in Settings::setConsoleInputAccessMapping" }; } else if (acl_map->at(keyName).second == SettingsAccessMask::NO_ACCESS) { - throw std::logic_error { "Key '" + keyName.Category + " > " + keyName.Key + "' is not accessible from within the runtime!" }; + throw std::logic_error { "Key '" + keyName.Category + "::" + keyName.Key + "' is not accessible from within the runtime!" }; } else if (acl_map->at(keyName).second == SettingsAccessMask::READ_ONLY) { - throw std::logic_error { "Key '" + keyName.Category + " > " + keyName.Key + "' is not writeable from within the runtime!" }; + throw std::logic_error { "Key '" + keyName.Category + "::" + keyName.Key + "' is not writeable from within the runtime!" }; } Key key = acl_map->at(keyName).first; @@ -164,9 +164,9 @@ void Settings::setConsoleInputAccessMapping(const ComposedKey& keyName, bool val if (!acl_map->contains(keyName)) { throw std::logic_error { "Unknown key name accessed in Settings::setConsoleInputAccessMapping" }; } else if (acl_map->at(keyName).second == SettingsAccessMask::NO_ACCESS) { - throw std::logic_error { "Key '" + keyName.Category + " > " + keyName.Key + "' is not accessible from within the runtime!" }; + throw std::logic_error { "Key '" + keyName.Category + "::" + keyName.Key + "' is not accessible from within the runtime!" }; } else if (acl_map->at(keyName).second == SettingsAccessMask::READ_ONLY) { - throw std::logic_error { "Key '" + keyName.Category + " > " + keyName.Key + "' is not writeable from within the runtime!" }; + throw std::logic_error { "Key '" + keyName.Category + "::" + keyName.Key + "' is not writeable from within the runtime!" }; } Key key = acl_map->at(keyName).first;