Skip to content

Commit

Permalink
use standard __func__ instead of __PRETTY_FUNCTION__
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Kaufmann committed Apr 30, 2014
1 parent 48be9ce commit 1cc7f54
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ class CBlockUndo
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
Expand Down
4 changes: 2 additions & 2 deletions src/txdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 1cc7f54

Please sign in to comment.