diff options
author | Bernard Normier <bernard@zeroc.com> | 2005-10-03 16:57:34 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2005-10-03 16:57:34 +0000 |
commit | d3578a4742a4d46d9ee38aa37e18f5483759278c (patch) | |
tree | 790b53f267cb55d8f9993d9338cbbbafec9886af /cpp/src/Freeze/Util.h | |
parent | Fixed bogus dependency on Internal.h in icegridadmin (diff) | |
download | ice-d3578a4742a4d46d9ee38aa37e18f5483759278c.tar.bz2 ice-d3578a4742a4d46d9ee38aa37e18f5483759278c.tar.xz ice-d3578a4742a4d46d9ee38aa37e18f5483759278c.zip |
Refactored code to work-around DB 4.3's DB_BUFFER_SMALL bug
Diffstat (limited to 'cpp/src/Freeze/Util.h')
-rw-r--r-- | cpp/src/Freeze/Util.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/cpp/src/Freeze/Util.h b/cpp/src/Freeze/Util.h index caaf24bf229..1cef571bba1 100644 --- a/cpp/src/Freeze/Util.h +++ b/cpp/src/Freeze/Util.h @@ -48,11 +48,24 @@ initializeOutDbt(std::vector<Ice::Byte>& v, Dbt& dbt) dbt.set_flags(DB_DBT_USERMEM); } + +// +// Handles a Berkeley DB DbException by resizing the +// given key/value/dbt (when the exception's errno is +// DB_SMALL_BUFFER) or by throwing a +// Freeze::DatabaseException +// + +void +handleDbException(const DbException&, const char*, int); + void -handleMemoryException(const DbMemoryException&, Key&, Dbt&); +handleDbException(const DbException&, Key&, Dbt&, + const char*, int); void -handleMemoryException(const DbMemoryException&, Key&, Dbt&, Value&, Dbt&); +handleDbException(const DbException&, Key&, Dbt&, Value&, Dbt&, + const char*, int); } |