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
2022-04-19 01:44:11 +00:00
parent b135de2b5f
commit 75b62e5260
8 changed files with 73 additions and 51 deletions
+13 -3
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);