aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/sqlite.cc
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-08 08:10:05 +0100
committereldritch horrors <pennae@lix.systems>2024-03-09 07:00:13 -0700
commitb221a14f0a477db06f8ab705bd08404e431ec135 (patch)
tree33cab3bfa39ca17a070e1afca13e531052021eee /src/libstore/sqlite.cc
parent3d9c7fc1e72e3471ae35c96ec418e8ac0913b099 (diff)
Merge pull request #9925 from 9999years/fmt-cleanup
Cleanup `fmt.hh` (cherry picked from commit 47a1dbb4b8e7913cbb9b4d604728b912e76e4ca0) Change-Id: Id076a45cb39652f437fe3f8bda10c310a9894777
Diffstat (limited to 'src/libstore/sqlite.cc')
-rw-r--r--src/libstore/sqlite.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstore/sqlite.cc b/src/libstore/sqlite.cc
index 7c8decb74..365794bd3 100644
--- a/src/libstore/sqlite.cc
+++ b/src/libstore/sqlite.cc
@@ -9,19 +9,19 @@
namespace nix {
-SQLiteError::SQLiteError(const char *path, const char *errMsg, int errNo, int extendedErrNo, int offset, hintformat && hf)
+SQLiteError::SQLiteError(const char *path, const char *errMsg, int errNo, int extendedErrNo, int offset, HintFmt && hf)
: Error(""), path(path), errMsg(errMsg), errNo(errNo), extendedErrNo(extendedErrNo), offset(offset)
{
auto offsetStr = (offset == -1) ? "" : "at offset " + std::to_string(offset) + ": ";
- err.msg = hintfmt("%s: %s%s, %s (in '%s')",
- normaltxt(hf.str()),
+ err.msg = HintFmt("%s: %s%s, %s (in '%s')",
+ Uncolored(hf.str()),
offsetStr,
sqlite3_errstr(extendedErrNo),
errMsg,
path ? path : "(in-memory)");
}
-[[noreturn]] void SQLiteError::throw_(sqlite3 * db, hintformat && hf)
+[[noreturn]] void SQLiteError::throw_(sqlite3 * db, HintFmt && hf)
{
int err = sqlite3_errcode(db);
int exterr = sqlite3_extended_errcode(db);
@@ -32,7 +32,7 @@ SQLiteError::SQLiteError(const char *path, const char *errMsg, int errNo, int ex
if (err == SQLITE_BUSY || err == SQLITE_PROTOCOL) {
auto exp = SQLiteBusy(path, errMsg, err, exterr, offset, std::move(hf));
- exp.err.msg = hintfmt(
+ exp.err.msg = HintFmt(
err == SQLITE_PROTOCOL
? "SQLite database '%s' is busy (SQLITE_PROTOCOL)"
: "SQLite database '%s' is busy",
@@ -248,7 +248,7 @@ void handleSQLiteBusy(const SQLiteBusy & e, time_t & nextWarning)
if (now > nextWarning) {
nextWarning = now + 10;
logWarning({
- .msg = hintfmt(e.what())
+ .msg = HintFmt(e.what())
});
}