mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
log: Use LogError for fatal errors
This commit is contained in:
@@ -41,11 +41,11 @@ FILE* FlatFileSeq::Open(const FlatFilePos& pos, bool read_only) const
|
||||
if (!file && !read_only)
|
||||
file = fsbridge::fopen(path, "wb+");
|
||||
if (!file) {
|
||||
LogPrintf("Unable to open file %s\n", fs::PathToString(path));
|
||||
LogError("Unable to open file %s", fs::PathToString(path));
|
||||
return nullptr;
|
||||
}
|
||||
if (pos.nPos && fseek(file, pos.nPos, SEEK_SET)) {
|
||||
LogPrintf("Unable to seek to position %u of %s\n", pos.nPos, fs::PathToString(path));
|
||||
LogError("Unable to seek to position %u of %s", pos.nPos, fs::PathToString(path));
|
||||
if (fclose(file) != 0) {
|
||||
LogError("Unable to close file %s", fs::PathToString(path));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user