@@ -883,11 +883,11 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock
883
883
fseek (file, postx.nTxOffset , SEEK_CUR);
884
884
file >> txOut;
885
885
} catch (std::exception &e) {
886
- return error (" %s() : deserialize or I/O error" , __PRETTY_FUNCTION__);
886
+ return error (" %s : Deserialize or I/O error - %s " , __PRETTY_FUNCTION__, e. what () );
887
887
}
888
888
hashBlock = header.GetHash ();
889
889
if (txOut.GetHash () != hash)
890
- return error (" %s() : txid mismatch" , __PRETTY_FUNCTION__);
890
+ return error (" %s : txid mismatch" , __PRETTY_FUNCTION__);
891
891
return true ;
892
892
}
893
893
}
@@ -936,7 +936,7 @@ bool WriteBlockToDisk(CBlock& block, CDiskBlockPos& pos)
936
936
// Open history file to append
937
937
CAutoFile fileout = CAutoFile (OpenBlockFile (pos), SER_DISK, CLIENT_VERSION);
938
938
if (!fileout)
939
- return error (" WriteBlockToDisk() : OpenBlockFile failed" );
939
+ return error (" WriteBlockToDisk : OpenBlockFile failed" );
940
940
941
941
// Write index header
942
942
unsigned int nSize = fileout.GetSerializeSize (block);
@@ -945,7 +945,7 @@ bool WriteBlockToDisk(CBlock& block, CDiskBlockPos& pos)
945
945
// Write block
946
946
long fileOutPos = ftell (fileout);
947
947
if (fileOutPos < 0 )
948
- return error (" WriteBlockToDisk() : ftell failed" );
948
+ return error (" WriteBlockToDisk : ftell failed" );
949
949
pos.nPos = (unsigned int )fileOutPos;
950
950
fileout << block;
951
951
@@ -964,19 +964,19 @@ bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos)
964
964
// Open history file to read
965
965
CAutoFile filein = CAutoFile (OpenBlockFile (pos, true ), SER_DISK, CLIENT_VERSION);
966
966
if (!filein)
967
- return error (" ReadBlockFromDisk(CBlock&, CDiskBlockPos&) : OpenBlockFile failed" );
967
+ return error (" ReadBlockFromDisk : OpenBlockFile failed" );
968
968
969
969
// Read block
970
970
try {
971
971
filein >> block;
972
972
}
973
973
catch (std::exception &e) {
974
- return error (" %s() : deserialize or I/O error" , __PRETTY_FUNCTION__);
974
+ return error (" %s : Deserialize or I/O error - %s " , __PRETTY_FUNCTION__, e. what () );
975
975
}
976
976
977
977
// Check the header
978
978
if (!CheckProofOfWork (block.GetHash (), block.nBits ))
979
- return error (" ReadBlockFromDisk(CBlock&, CDiskBlockPos&) : errors in block header" );
979
+ return error (" ReadBlockFromDisk : Errors in block header" );
980
980
981
981
return true ;
982
982
}
@@ -2876,7 +2876,7 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
2876
2876
break ;
2877
2877
}
2878
2878
} catch (std::exception &e) {
2879
- LogPrintf (" %s() : Deserialize or I/O error caught during load \n " , __PRETTY_FUNCTION__);
2879
+ LogPrintf (" %s : Deserialize or I/O error - %s " , __PRETTY_FUNCTION__, e. what () );
2880
2880
}
2881
2881
}
2882
2882
fclose (fileIn);
0 commit comments