10 namespace swift::core::fsd
12 ServerError::ServerError() {}
14 ServerError::ServerError(
const QString &sender,
const QString &receiver,
ServerErrorCode errorCode,
15 const QString &causingParameter,
const QString &description)
16 :
MessageBase(sender, receiver), m_errorNumber(errorCode), m_causingParameter(causingParameter),
17 m_description(description)
22 static const QVector<ServerErrorCode> fatalErrors {
23 ServerErrorCode::CallsignInUse, ServerErrorCode::InvalidCallsign,
24 ServerErrorCode::AlreadyRegistered, ServerErrorCode::InvalidCidPassword,
25 ServerErrorCode::InvalidRevision, ServerErrorCode::RequestedLevelTooHigh,
26 ServerErrorCode::ServerFull, ServerErrorCode::CidSuspended,
27 ServerErrorCode::RatingTooLow, ServerErrorCode::InvalidClient,
28 ServerErrorCode::AuthTimeout,
32 else {
return false; }
37 auto tokens = QStringList {};
40 tokens.push_back(QString::number(
static_cast<int>(
m_errorNumber)));
48 if (tokens.size() < 5)
QString m_receiver
message receiver
QString m_sender
message sender
FSD Message Server Error.
QString m_description
Properties.
static ServerError fromTokens(const QStringList &tokens)
Construct from tokens.
QStringList toTokens() const
Message converted to tokens.
bool isFatalError() const
Fatal?
QString m_causingParameter
Properties.
ServerErrorCode m_errorNumber
Properties.
Class for emitting a log message.
Derived & debug()
Set the severity to debug.
ServerErrorCode
Server error codes.