mirror of
https://github.com/NixOS/nix
synced 2025-07-04 15:31:47 +02:00
Split ignoreException for destructors or interrupt-safe
This commit is contained in:
parent
a1415471b8
commit
3df619339c
27 changed files with 164 additions and 125 deletions
|
@ -86,7 +86,7 @@ SQLite::~SQLite()
|
|||
if (db && sqlite3_close(db) != SQLITE_OK)
|
||||
SQLiteError::throw_(db, "closing database");
|
||||
} catch (...) {
|
||||
ignoreException();
|
||||
ignoreExceptionInDestructor();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ SQLiteStmt::~SQLiteStmt()
|
|||
if (stmt && sqlite3_finalize(stmt) != SQLITE_OK)
|
||||
SQLiteError::throw_(db, "finalizing statement '%s'", sql);
|
||||
} catch (...) {
|
||||
ignoreException();
|
||||
ignoreExceptionInDestructor();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -240,7 +240,7 @@ SQLiteTxn::~SQLiteTxn()
|
|||
if (active && sqlite3_exec(db, "rollback;", 0, 0, 0) != SQLITE_OK)
|
||||
SQLiteError::throw_(db, "aborting transaction");
|
||||
} catch (...) {
|
||||
ignoreException();
|
||||
ignoreExceptionInDestructor();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue