@ -23,7 +23,7 @@ public:
dbwrapper_error ( const std : : string & msg ) : std : : runtime_error ( msg ) { }
dbwrapper_error ( const std : : string & msg ) : std : : runtime_error ( msg ) { }
} ;
} ;
void HandleError ( const leveldb : : Status & status ) throw ( dbwrapper_error ) ;
void HandleError ( const leveldb : : Status & status ) ;
/** Batch of changes queued to be written to a CDBWrapper */
/** Batch of changes queued to be written to a CDBWrapper */
class CDBBatch
class CDBBatch
@ -180,7 +180,7 @@ public:
~ CDBWrapper ( ) ;
~ CDBWrapper ( ) ;
template < typename K , typename V >
template < typename K , typename V >
bool Read ( const K & key , V & value ) const throw ( dbwrapper_error )
bool Read ( const K & key , V & value ) const
{
{
CDataStream ssKey ( SER_DISK , CLIENT_VERSION ) ;
CDataStream ssKey ( SER_DISK , CLIENT_VERSION ) ;
ssKey . reserve ( ssKey . GetSerializeSize ( key ) ) ;
ssKey . reserve ( ssKey . GetSerializeSize ( key ) ) ;
@ -206,7 +206,7 @@ public:
}
}
template < typename K , typename V >
template < typename K , typename V >
bool Write ( const K & key , const V & value , bool fSync = false ) throw ( dbwrapper_error )
bool Write ( const K & key , const V & value , bool fSync = false )
{
{
CDBBatch batch ( & obfuscate_key ) ;
CDBBatch batch ( & obfuscate_key ) ;
batch . Write ( key , value ) ;
batch . Write ( key , value ) ;
@ -214,7 +214,7 @@ public:
}
}
template < typename K >
template < typename K >
bool Exists ( const K & key ) const throw ( dbwrapper_error )
bool Exists ( const K & key ) const
{
{
CDataStream ssKey ( SER_DISK , CLIENT_VERSION ) ;
CDataStream ssKey ( SER_DISK , CLIENT_VERSION ) ;
ssKey . reserve ( ssKey . GetSerializeSize ( key ) ) ;
ssKey . reserve ( ssKey . GetSerializeSize ( key ) ) ;
@ -233,14 +233,14 @@ public:
}
}
template < typename K >
template < typename K >
bool Erase ( const K & key , bool fSync = false ) throw ( dbwrapper_error )
bool Erase ( const K & key , bool fSync = false )
{
{
CDBBatch batch ( & obfuscate_key ) ;
CDBBatch batch ( & obfuscate_key ) ;
batch . Erase ( key ) ;
batch . Erase ( key ) ;
return WriteBatch ( batch , fSync ) ;
return WriteBatch ( batch , fSync ) ;
}
}
bool WriteBatch ( CDBBatch & batch , bool fSync = false ) throw ( dbwrapper_error ) ;
bool WriteBatch ( CDBBatch & batch , bool fSync = false ) ;
// not available for LevelDB; provide for compatibility with BDB
// not available for LevelDB; provide for compatibility with BDB
bool Flush ( )
bool Flush ( )
@ -248,7 +248,7 @@ public:
return true ;
return true ;
}
}
bool Sync ( ) throw ( dbwrapper_error )
bool Sync ( )
{
{
CDBBatch batch ( & obfuscate_key ) ;
CDBBatch batch ( & obfuscate_key ) ;
return WriteBatch ( batch , true ) ;
return WriteBatch ( batch , true ) ;