@ -1091,7 +1091,7 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock
file > > header ;
file > > header ;
fseek ( file . Get ( ) , postx . nTxOffset , SEEK_CUR ) ;
fseek ( file . Get ( ) , postx . nTxOffset , SEEK_CUR ) ;
file > > txOut ;
file > > txOut ;
} catch ( std : : exception & e ) {
} catch ( const std : : exception & e ) {
return error ( " %s : Deserialize or I/O error - %s " , __func__ , e . what ( ) ) ;
return error ( " %s : Deserialize or I/O error - %s " , __func__ , e . what ( ) ) ;
}
}
hashBlock = header . GetHash ( ) ;
hashBlock = header . GetHash ( ) ;
@ -1174,7 +1174,7 @@ bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos)
try {
try {
filein > > block ;
filein > > block ;
}
}
catch ( std : : exception & e ) {
catch ( const std : : exception & e ) {
return error ( " %s : Deserialize or I/O error - %s " , __func__ , e . what ( ) ) ;
return error ( " %s : Deserialize or I/O error - %s " , __func__ , e . what ( ) ) ;
}
}
@ -2598,7 +2598,7 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex,
return state . Abort ( " Failed to write block " ) ;
return state . Abort ( " Failed to write block " ) ;
if ( ! ReceivedBlockTransactions ( block , state , pindex , blockPos ) )
if ( ! ReceivedBlockTransactions ( block , state , pindex , blockPos ) )
return error ( " AcceptBlock() : ReceivedBlockTransactions failed " ) ;
return error ( " AcceptBlock() : ReceivedBlockTransactions failed " ) ;
} catch ( std : : runtime_error & e ) {
} catch ( const std : : runtime_error & e ) {
return state . Abort ( std : : string ( " System error: " ) + e . what ( ) ) ;
return state . Abort ( std : : string ( " System error: " ) + e . what ( ) ) ;
}
}
@ -2990,7 +2990,7 @@ bool InitBlockIndex() {
return error ( " LoadBlockIndex() : genesis block cannot be activated " ) ;
return error ( " LoadBlockIndex() : genesis block cannot be activated " ) ;
// Force a chainstate write so that when we VerifyDB in a moment, it doesn't check stale data
// Force a chainstate write so that when we VerifyDB in a moment, it doesn't check stale data
return FlushStateToDisk ( state , FLUSH_STATE_ALWAYS ) ;
return FlushStateToDisk ( state , FLUSH_STATE_ALWAYS ) ;
} catch ( std : : runtime_error & e ) {
} catch ( const std : : runtime_error & e ) {
return error ( " LoadBlockIndex() : failed to initialize block database : % s " , e.what()) ;
return error ( " LoadBlockIndex() : failed to initialize block database : % s " , e.what()) ;
}
}
}
}
@ -3030,7 +3030,7 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
blkdat > > nSize ;
blkdat > > nSize ;
if ( nSize < 80 | | nSize > MAX_BLOCK_SIZE )
if ( nSize < 80 | | nSize > MAX_BLOCK_SIZE )
continue ;
continue ;
} catch ( const std : : exception & ) {
} catch ( const std : : exception & ) {
// no valid block header found; don't complain
// no valid block header found; don't complain
break ;
break ;
}
}
@ -3090,11 +3090,11 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
mapBlocksUnknownParent . erase ( it ) ;
mapBlocksUnknownParent . erase ( it ) ;
}
}
}
}
} catch ( std : : exception & e ) {
} catch ( const std : : exception & e ) {
LogPrintf ( " %s : Deserialize or I/O error - %s " , __func__ , e . what ( ) ) ;
LogPrintf ( " %s : Deserialize or I/O error - %s " , __func__ , e . what ( ) ) ;
}
}
}
}
} catch ( std : : runtime_error & e ) {
} catch ( const std : : runtime_error & e ) {
AbortNode ( std : : string ( " System error: " ) + e . what ( ) ) ;
AbortNode ( std : : string ( " System error: " ) + e . what ( ) ) ;
}
}
if ( nLoaded > 0 )
if ( nLoaded > 0 )
@ -4088,7 +4088,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
ss < < " : hash " < < hash . ToString ( ) ;
ss < < " : hash " < < hash . ToString ( ) ;
}
}
LogPrint ( " net " , " Reject %s \n " , SanitizeString ( ss . str ( ) ) ) ;
LogPrint ( " net " , " Reject %s \n " , SanitizeString ( ss . str ( ) ) ) ;
} catch ( std : : ios_base : : failure & e ) {
} catch ( const std : : ios_base : : failure & ) {
// Avoid feedback loops by preventing reject messages from triggering a new reject message.
// Avoid feedback loops by preventing reject messages from triggering a new reject message.
LogPrint ( " net " , " Unparseable reject message received \n " ) ;
LogPrint ( " net " , " Unparseable reject message received \n " ) ;
}
}
@ -4192,7 +4192,7 @@ bool ProcessMessages(CNode* pfrom)
fRet = ProcessMessage ( pfrom , strCommand , vRecv , msg . nTime ) ;
fRet = ProcessMessage ( pfrom , strCommand , vRecv , msg . nTime ) ;
boost : : this_thread : : interruption_point ( ) ;
boost : : this_thread : : interruption_point ( ) ;
}
}
catch ( std : : ios_base : : failure & e )
catch ( const std : : ios_base : : failure & e )
{
{
pfrom - > PushMessage ( " reject " , strCommand , REJECT_MALFORMED , string ( " error parsing message " ) ) ;
pfrom - > PushMessage ( " reject " , strCommand , REJECT_MALFORMED , string ( " error parsing message " ) ) ;
if ( strstr ( e . what ( ) , " end of data " ) )
if ( strstr ( e . what ( ) , " end of data " ) )
@ -4210,10 +4210,10 @@ bool ProcessMessages(CNode* pfrom)
PrintExceptionContinue ( & e , " ProcessMessages() " ) ;
PrintExceptionContinue ( & e , " ProcessMessages() " ) ;
}
}
}
}
catch ( boost : : thread_interrupted ) {
catch ( const boost : : thread_interrupted & ) {
throw ;
throw ;
}
}
catch ( std : : exception & e ) {
catch ( const std : : exception & e ) {
PrintExceptionContinue ( & e , " ProcessMessages() " ) ;
PrintExceptionContinue ( & e , " ProcessMessages() " ) ;
} catch ( . . . ) {
} catch ( . . . ) {
PrintExceptionContinue ( NULL , " ProcessMessages() " ) ;
PrintExceptionContinue ( NULL , " ProcessMessages() " ) ;
@ -4507,7 +4507,7 @@ bool CBlockUndo::ReadFromDisk(const CDiskBlockPos &pos, const uint256 &hashBlock
filein > > * this ;
filein > > * this ;
filein > > hashChecksum ;
filein > > hashChecksum ;
}
}
catch ( std : : exception & e ) {
catch ( const std : : exception & e ) {
return error ( " %s : Deserialize or I/O error - %s " , __func__ , e . what ( ) ) ;
return error ( " %s : Deserialize or I/O error - %s " , __func__ , e . what ( ) ) ;
}
}