1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-27 20:51:00 +01:00

Fixed a lot of remote store issues. But there is still a bug with 32bit unsigned integers: 'implementation cannot deal with > 32-bit integers'

This commit is contained in:
Wouter den Breejen 2007-08-28 15:22:27 +00:00
parent 2e7539bd27
commit 627afcc1aa
16 changed files with 144 additions and 54 deletions

View file

@ -71,7 +71,7 @@ Transaction::~Transaction()
void Transaction::begin(Database & db)
{
assert(txn == 0);
db.requireEnv();
db.requireEnv("begin transaction");
try {
db.env->txn_begin(0, &txn, 0);
} catch (DbException e) { rethrow(e); }
@ -110,11 +110,11 @@ void Transaction::moveTo(Transaction & t)
}
void Database::requireEnv()
void Database::requireEnv(string debug)
{
checkInterrupt();
if (!env) throw Error("database environment is not open "
"(maybe you don't have sufficient permission?)");
if (!env) throw Error(format("database environment is not open while trying '%1%'"
"(maybe you don't have sufficient permission?)") % debug);
}
@ -300,7 +300,7 @@ void Database::close()
TableId Database::openTable(const string & tableName, bool sorted)
{
requireEnv();
requireEnv(tableName);
TableId table = nextId++;
try {