Error Handling in the Cache Manager
If an error occurs during a caching operation, it is the responsibility of the cache manager to throw an exception that describes the error. If no exception is thrown, the caching operation is considered successful, even if an empty cache entry is returned.
In cache managers derived from RWDBCacheManager, if one of the member functions throws an exception, the following occurs:
*A copy of the calling object’s RWDBStatus object is created. The calling object’s own RWDBStatus object is not changed.
*An error of type RWDBStatus::cacheReadError or RWDBStatus::cacheWriteError is set on the new RWDBStatus object.
*An associated error message is also set on the object, as follows:
*If an exception of type RWxmsg or std:exception occurs, the message from the exception is set as the message in the RWDBStatus object.
*For all other exceptions, the message “unknown exception” is set in the RWDBStatus object.
If an error handler is installed, the above activity triggers the handler.