mirror of
https://github.com/matrix-construct/construct
synced 2024-12-28 16:34:13 +01:00
ircd::db: Improve error string generation; cases for custom severity.
This commit is contained in:
parent
7dd821fd55
commit
79786f7076
1 changed files with 10 additions and 3 deletions
13
ircd/db.cc
13
ircd/db.cc
|
@ -7268,11 +7268,12 @@ ircd::db::error::error(const rocksdb::Status &s)
|
||||||
{
|
{
|
||||||
fmt::sprintf
|
fmt::sprintf
|
||||||
{
|
{
|
||||||
buf, "(%u:%u:%u %s) :%s",
|
buf, "(%u:%u:%u) %s %s :%s",
|
||||||
this->code,
|
this->code,
|
||||||
this->subcode,
|
this->subcode,
|
||||||
this->severity,
|
this->severity,
|
||||||
reflect(s.severity()),
|
reflect(rocksdb::Status::Severity(this->severity)),
|
||||||
|
reflect(rocksdb::Status::Code(this->code)),
|
||||||
s.getState(),
|
s.getState(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -7293,7 +7294,13 @@ ircd::db::error::error(generate_skip_t,
|
||||||
}
|
}
|
||||||
,severity
|
,severity
|
||||||
{
|
{
|
||||||
s.severity()
|
s.severity()?
|
||||||
|
s.severity():
|
||||||
|
|
||||||
|
code == rocksdb::Status::kCorruption?
|
||||||
|
rocksdb::Status::kHardError:
|
||||||
|
|
||||||
|
rocksdb::Status::kNoError
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue