Browse Source

use standard __func__ instead of __PRETTY_FUNCTION__

0.10
Philip Kaufmann 11 years ago
parent
commit
1cc7f54a8d
  1. 8
      src/main.cpp
  2. 2
      src/main.h
  3. 4
      src/txdb.cpp

8
src/main.cpp

@ -1032,11 +1032,11 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock @@ -1032,11 +1032,11 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock
fseek(file, postx.nTxOffset, SEEK_CUR);
file >> txOut;
} catch (std::exception &e) {
return error("%s : Deserialize or I/O error - %s", __PRETTY_FUNCTION__, e.what());
return error("%s : Deserialize or I/O error - %s", __func__, e.what());
}
hashBlock = header.GetHash();
if (txOut.GetHash() != hash)
return error("%s : txid mismatch", __PRETTY_FUNCTION__);
return error("%s : txid mismatch", __func__);
return true;
}
}
@ -1120,7 +1120,7 @@ bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos) @@ -1120,7 +1120,7 @@ bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos)
filein >> block;
}
catch (std::exception &e) {
return error("%s : Deserialize or I/O error - %s", __PRETTY_FUNCTION__, e.what());
return error("%s : Deserialize or I/O error - %s", __func__, e.what());
}
// Check the header
@ -3126,7 +3126,7 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp) @@ -3126,7 +3126,7 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
break;
}
} catch (std::exception &e) {
LogPrintf("%s : Deserialize or I/O error - %s", __PRETTY_FUNCTION__, e.what());
LogPrintf("%s : Deserialize or I/O error - %s", __func__, e.what());
}
}
fclose(fileIn);

2
src/main.h

@ -381,7 +381,7 @@ public: @@ -381,7 +381,7 @@ public:
filein >> hashChecksum;
}
catch (std::exception &e) {
return error("%s : Deserialize or I/O error - %s", __PRETTY_FUNCTION__, e.what());
return error("%s : Deserialize or I/O error - %s", __func__, e.what());
}
// Verify checksum

4
src/txdb.cpp

@ -148,7 +148,7 @@ bool CCoinsViewDB::GetStats(CCoinsStats &stats) { @@ -148,7 +148,7 @@ bool CCoinsViewDB::GetStats(CCoinsStats &stats) {
}
pcursor->Next();
} catch (std::exception &e) {
return error("%s : Deserialize or I/O error - %s", __PRETTY_FUNCTION__, e.what());
return error("%s : Deserialize or I/O error - %s", __func__, e.what());
}
}
delete pcursor;
@ -226,7 +226,7 @@ bool CBlockTreeDB::LoadBlockIndexGuts() @@ -226,7 +226,7 @@ bool CBlockTreeDB::LoadBlockIndexGuts()
break; // if shutdown requested or finished loading block index
}
} catch (std::exception &e) {
return error("%s : Deserialize or I/O error - %s", __PRETTY_FUNCTION__, e.what());
return error("%s : Deserialize or I/O error - %s", __func__, e.what());
}
}
delete pcursor;

Loading…
Cancel
Save