in commands/source/RejectedErrorCode.cpp [58:109]
RejectedErrorCode FromString(const Crt::String &str)
{
size_t hash = Crt::HashString(str.c_str());
if (hash == INVALID_TOPIC_HASH)
{
return RejectedErrorCode::InvalidTopic;
}
if (hash == INVALID_JSON_HASH)
{
return RejectedErrorCode::InvalidJson;
}
if (hash == INVALID_REQUEST_HASH)
{
return RejectedErrorCode::InvalidRequest;
}
if (hash == INVALID_STATE_TRANSITION_HASH)
{
return RejectedErrorCode::InvalidStateTransition;
}
if (hash == RESOURCE_NOT_FOUND_HASH)
{
return RejectedErrorCode::ResourceNotFound;
}
if (hash == VERSION_MISMATCH_HASH)
{
return RejectedErrorCode::VersionMismatch;
}
if (hash == INTERNAL_ERROR_HASH)
{
return RejectedErrorCode::InternalError;
}
if (hash == REQUEST_THROTTLED_HASH)
{
return RejectedErrorCode::RequestThrottled;
}
if (hash == TERMINAL_STATE_REACHED_HASH)
{
return RejectedErrorCode::TerminalStateReached;
}
assert(0);
return static_cast<RejectedErrorCode>(-1);
}