1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-30 07:33:16 +02:00

Avoid fmt when constructor already does it

There is a correctnes issue here, but #3724 will fix that. This is just
a cleanup for brevity's sake.
This commit is contained in:
John Ericson 2020-06-18 17:54:16 +00:00
parent b135de2b5f
commit 75b62e5260
8 changed files with 73 additions and 51 deletions

View file

@ -96,10 +96,20 @@ struct SQLiteTxn
};
MakeError(SQLiteError, Error);
MakeError(SQLiteBusy, SQLiteError);
struct SQLiteError : Error
{
const char *path;
int errNo, extendedErrNo;
[[noreturn]] void throwSQLiteError(sqlite3 * db, const FormatOrString & fs);
template<typename... Args>
[[noreturn]] static void throw_(sqlite3 * db, const std::string & fs, const Args & ... args);
protected:
template<typename... Args>
SQLiteError(const char *path, int errNo, int extendedErrNo, const Args & ... args);
};
MakeError(SQLiteBusy, SQLiteError);
void handleSQLiteBusy(const SQLiteBusy & e);