diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-10-24 12:26:48 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-10-24 12:26:48 +0000 |
commit | 53bfd93a3d17b185c415d6c7d86846f88508a2ed (patch) | |
tree | 4337945f7af08eeb8e7a48cc50491b3093fa9e05 /cpp/src/Freeze/MapI.cpp | |
parent | Fixed bug where node couldn't be interrupted if master isn't available (diff) | |
download | ice-53bfd93a3d17b185c415d6c7d86846f88508a2ed.tar.bz2 ice-53bfd93a3d17b185c415d6c7d86846f88508a2ed.tar.xz ice-53bfd93a3d17b185c415d6c7d86846f88508a2ed.zip |
Change to support DB 4.5.20
Diffstat (limited to 'cpp/src/Freeze/MapI.cpp')
-rw-r--r-- | cpp/src/Freeze/MapI.cpp | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/cpp/src/Freeze/MapI.cpp b/cpp/src/Freeze/MapI.cpp index 13c86e5eaac..5d6744252a2 100644 --- a/cpp/src/Freeze/MapI.cpp +++ b/cpp/src/Freeze/MapI.cpp @@ -231,33 +231,34 @@ Freeze::IteratorHelperI::find(const Key& key) const Dbt dbValue; dbValue.set_flags(DB_DBT_USERMEM | DB_DBT_PARTIAL); - try - { - if(_dbc->get(&dbKey, &dbValue, DB_SET) == 0) - { - return true; - } - else - { - return false; - } - } - catch(const ::DbDeadlockException& dx) + for(;;) { - if(_tx != 0) - { - _tx->dead(); - } + try + { + if(_dbc->get(&dbKey, &dbValue, DB_SET) == 0) + { + return true; + } + else + { + return false; + } + } + catch(const ::DbDeadlockException& dx) + { + if(_tx != 0) + { + _tx->dead(); + } - DeadlockException ex(__FILE__, __LINE__); - ex.message = dx.what(); - throw ex; - } - catch(const ::DbException& dx) - { - DatabaseException ex(__FILE__, __LINE__); - ex.message = dx.what(); - throw ex; + DeadlockException ex(__FILE__, __LINE__); + ex.message = dx.what(); + throw ex; + } + catch(const ::DbException& dx) + { + handleDbException(dx, const_cast<Key&>(key), dbKey, __FILE__, __LINE__); + } } } |