Skip to content

Commit b2ee43f

Browse files
committed
Merge pull request #4111
1cc7f54 use standard __func__ instead of __PRETTY_FUNCTION__ (Philip Kaufmann)
2 parents 48be9ce + 1cc7f54 commit b2ee43f

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,11 +1032,11 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock
10321032
fseek(file, postx.nTxOffset, SEEK_CUR);
10331033
file >> txOut;
10341034
} catch (std::exception &e) {
1035-
return error("%s : Deserialize or I/O error - %s", __PRETTY_FUNCTION__, e.what());
1035+
return error("%s : Deserialize or I/O error - %s", __func__, e.what());
10361036
}
10371037
hashBlock = header.GetHash();
10381038
if (txOut.GetHash() != hash)
1039-
return error("%s : txid mismatch", __PRETTY_FUNCTION__);
1039+
return error("%s : txid mismatch", __func__);
10401040
return true;
10411041
}
10421042
}
@@ -1120,7 +1120,7 @@ bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos)
11201120
filein >> block;
11211121
}
11221122
catch (std::exception &e) {
1123-
return error("%s : Deserialize or I/O error - %s", __PRETTY_FUNCTION__, e.what());
1123+
return error("%s : Deserialize or I/O error - %s", __func__, e.what());
11241124
}
11251125

11261126
// Check the header
@@ -3126,7 +3126,7 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
31263126
break;
31273127
}
31283128
} catch (std::exception &e) {
3129-
LogPrintf("%s : Deserialize or I/O error - %s", __PRETTY_FUNCTION__, e.what());
3129+
LogPrintf("%s : Deserialize or I/O error - %s", __func__, e.what());
31303130
}
31313131
}
31323132
fclose(fileIn);

src/main.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ class CBlockUndo
381381
filein >> hashChecksum;
382382
}
383383
catch (std::exception &e) {
384-
return error("%s : Deserialize or I/O error - %s", __PRETTY_FUNCTION__, e.what());
384+
return error("%s : Deserialize or I/O error - %s", __func__, e.what());
385385
}
386386

387387
// Verify checksum

src/txdb.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ bool CCoinsViewDB::GetStats(CCoinsStats &stats) {
148148
}
149149
pcursor->Next();
150150
} catch (std::exception &e) {
151-
return error("%s : Deserialize or I/O error - %s", __PRETTY_FUNCTION__, e.what());
151+
return error("%s : Deserialize or I/O error - %s", __func__, e.what());
152152
}
153153
}
154154
delete pcursor;
@@ -226,7 +226,7 @@ bool CBlockTreeDB::LoadBlockIndexGuts()
226226
break; // if shutdown requested or finished loading block index
227227
}
228228
} catch (std::exception &e) {
229-
return error("%s : Deserialize or I/O error - %s", __PRETTY_FUNCTION__, e.what());
229+
return error("%s : Deserialize or I/O error - %s", __func__, e.what());
230230
}
231231
}
232232
delete pcursor;

0 commit comments

Comments
 (0)