|
VoltMod
C++23 framework for CS2 server plugins
|
One failure: a code to branch on, text for the log, and an optional translation key. More...
#include <Result.hpp>
Static Public Member Functions | |
| static Error | NotFound (std::string detail) |
| static Error | NotReady (std::string detail) |
| static Error | Invalid (std::string detail) |
| static Error | Denied (std::string key) |
| static Error | Immune (std::string key) |
| static Error | Unsupported (std::string detail) |
| static Error | Engine (std::string detail) |
| static Error | Failed (std::string detail) |
Public Attributes | |
| ErrorCode | Code = ErrorCode::Failed |
| std::string | Detail |
| std::string | Key |
| std::string | Text |
One failure: a code to branch on, text for the log, and an optional translation key.
Detail is operator-facing and never translated - it names offsets, convars, and SQL state. Key is the translation key a player-facing reply uses; it is empty whenever the failure has nothing sensible to say to a player. A handler that replies looks at Key, logs Detail, and does not invent one from the other.
Definition at line 41 of file Result.hpp.
key is a translation key: these two are the failures a player is told about.
Definition at line 54 of file Result.hpp.
References VoltMod::Denied, and VoltMod::ReadFile().
Definition at line 58 of file Result.hpp.
References VoltMod::Engine, and VoltMod::ReadFile().
Referenced by VoltMod::GameEvents::Available(), VoltMod::Bindings::Bind(), VoltMod::Find(), VoltMod::ConVars::Find(), and VoltMod::Internal::OpenUnsafe().
Definition at line 59 of file Result.hpp.
References VoltMod::Failed, and VoltMod::ReadFile().
Referenced by VoltMod::SharedLibrary::Open().
Definition at line 55 of file Result.hpp.
References VoltMod::Immune, and VoltMod::ReadFile().
Definition at line 51 of file Result.hpp.
References VoltMod::Invalid, and VoltMod::ReadFile().
Referenced by VoltMod::CheckConfig(), VoltMod::Internal::CheckSchema(), VoltMod::InstalledPlugins::Discover(), VoltMod::ConVars::Find(), VoltMod::FindBaseInRtti(), VoltMod::FindBaseOffsetByTypeInfo(), VoltMod::ScreenManager::ForPlayer(), VoltMod::NotSourceXml(), VoltMod::ButtonPressMessage::Parse(), VoltMod::LayoutPath::Parse(), VoltMod::Json::ParseDocument(), VoltMod::Json::Read(), VoltMod::Json::ReadFile(), VoltMod::ReadVarint(), VoltMod::PluginDependencies::Resolve(), VoltMod::ResolveDialect(), VoltMod::SkipField(), VoltMod::ValidateDescriptor(), VoltMod::Schema::VerifySchemaLayout(), VoltMod::WriteAllText(), and VoltMod::Schema::WriteDumpFile().
Definition at line 49 of file Result.hpp.
References VoltMod::NotFound, and VoltMod::ReadFile().
Referenced by VoltMod::Policy::Authorize(), VoltMod::Policy::AuthorizeSteamId(), VoltMod::ConVars::Find(), VoltMod::FindBaseIn(), VoltMod::FindBaseInRtti(), VoltMod::FindBaseOffsetByTypeInfo(), VoltMod::FindScriptBinding(), VoltMod::GameDataScanner::GameDataScanner(), VoltMod::ReadAllText(), VoltMod::RefuseUnsatisfied(), VoltMod::RttiOf(), VoltMod::SharedLibrary::Symbol(), and VoltMod::Unbound().
Definition at line 50 of file Result.hpp.
References VoltMod::NotReady, and VoltMod::ReadFile().
Referenced by VoltMod::ConVars::Available(), VoltMod::EntitySystem::Available(), VoltMod::TextMessages::Available(), VoltMod::Messages::Available(), VoltMod::NoGameRules(), VoltMod::RefuseUnsatisfied(), VoltMod::Options< TSettings, TSnapshot >::Reload(), VoltMod::Internal::Resolve(), VoltMod::Controller::Respawn(), VoltMod::ConVar< T >::Set(), VoltMod::Pawn::SetObserverMode(), VoltMod::SharedLibrary::Symbol(), and VoltMod::Schema::VerifySchemaLayout().
Definition at line 57 of file Result.hpp.
References VoltMod::ReadFile(), and VoltMod::Unsupported.
Referenced by VoltMod::EntitySystem::Available(), VoltMod::Rounds::Available(), VoltMod::Trace::Available(), VoltMod::GameEvents::Available(), VoltMod::Damage::Available(), VoltMod::Movement::Available(), VoltMod::Teleport::Available(), VoltMod::Visibility::Available(), VoltMod::ScreenManager::Available(), VoltMod::Trace::Box(), VoltMod::FindBaseInRtti(), VoltMod::FindBaseOffsetByTypeInfo(), VoltMod::ScreenManager::ForPlayer(), VoltMod::HookFunction(), VoltMod::HookVirtual(), and VoltMod::Controller::Respawn().
| ErrorCode VoltMod::Error::Code = ErrorCode::Failed |
Definition at line 43 of file Result.hpp.
Referenced by VoltMod::Caller::Fail().
| std::string VoltMod::Error::Detail |
Definition at line 44 of file Result.hpp.
| std::string VoltMod::Error::Key |
Definition at line 45 of file Result.hpp.
| std::string VoltMod::Error::Text |
A line already localized for whoever ran the command; shown in place of Key.
Definition at line 47 of file Result.hpp.