@@ -878,11 +878,11 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock
878
878
fseek (file, postx.nTxOffset , SEEK_CUR);
879
879
file >> txOut;
880
880
} catch (std::exception &e) {
881
- return error (" %s() : deserialize or I/O error" , __PRETTY_FUNCTION__);
881
+ return error (" %s : Deserialize or I/O error - %s " , __PRETTY_FUNCTION__, e. what () );
882
882
}
883
883
hashBlock = header.GetHash ();
884
884
if (txOut.GetHash () != hash)
885
- return error (" %s() : txid mismatch" , __PRETTY_FUNCTION__);
885
+ return error (" %s : txid mismatch" , __PRETTY_FUNCTION__);
886
886
return true ;
887
887
}
888
888
}
@@ -931,7 +931,7 @@ bool WriteBlockToDisk(CBlock& block, CDiskBlockPos& pos)
931
931
// Open history file to append
932
932
CAutoFile fileout = CAutoFile (OpenBlockFile (pos), SER_DISK, CLIENT_VERSION);
933
933
if (!fileout)
934
- return error (" WriteBlockToDisk() : OpenBlockFile failed" );
934
+ return error (" WriteBlockToDisk : OpenBlockFile failed" );
935
935
936
936
// Write index header
937
937
unsigned int nSize = fileout.GetSerializeSize (block);
@@ -940,7 +940,7 @@ bool WriteBlockToDisk(CBlock& block, CDiskBlockPos& pos)
940
940
// Write block
941
941
long fileOutPos = ftell (fileout);
942
942
if (fileOutPos < 0 )
943
- return error (" WriteBlockToDisk() : ftell failed" );
943
+ return error (" WriteBlockToDisk : ftell failed" );
944
944
pos.nPos = (unsigned int )fileOutPos;
945
945
fileout << block;
946
946
@@ -959,19 +959,19 @@ bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos)
959
959
// Open history file to read
960
960
CAutoFile filein = CAutoFile (OpenBlockFile (pos, true ), SER_DISK, CLIENT_VERSION);
961
961
if (!filein)
962
- return error (" ReadBlockFromDisk(CBlock&, CDiskBlockPos&) : OpenBlockFile failed" );
962
+ return error (" ReadBlockFromDisk : OpenBlockFile failed" );
963
963
964
964
// Read block
965
965
try {
966
966
filein >> block;
967
967
}
968
968
catch (std::exception &e) {
969
- return error (" %s() : deserialize or I/O error" , __PRETTY_FUNCTION__);
969
+ return error (" %s : Deserialize or I/O error - %s " , __PRETTY_FUNCTION__, e. what () );
970
970
}
971
971
972
972
// Check the header
973
973
if (!CheckProofOfWork (block.GetHash (), block.nBits ))
974
- return error (" ReadBlockFromDisk(CBlock&, CDiskBlockPos&) : errors in block header" );
974
+ return error (" ReadBlockFromDisk : Errors in block header" );
975
975
976
976
return true ;
977
977
}
@@ -2852,7 +2852,7 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
2852
2852
break ;
2853
2853
}
2854
2854
} catch (std::exception &e) {
2855
- LogPrintf (" %s() : Deserialize or I/O error caught during load \n " , __PRETTY_FUNCTION__);
2855
+ LogPrintf (" %s : Deserialize or I/O error - %s " , __PRETTY_FUNCTION__, e. what () );
2856
2856
}
2857
2857
}
2858
2858
fclose (fileIn);
0 commit comments