summaryrefslogtreecommitdiff
path: root/src/RequestGroupMan.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-12-09 23:32:38 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-12-09 23:32:38 +0900
commitd5ffa2532da9283abaf18d5ca4e58d07a8b2f405 (patch)
tree25ce2972b76194c42f1b283f814f837d53b10c25 /src/RequestGroupMan.cc
parent9a6f88c162bc49d8e5bbefdcd2cf239706c3d0d9 (diff)
AbstractDiskWriter::closeFile(): Throw exception if close() failed.
~AbstractDiskWriter calles closeFile(), but suppresses exception. MultiDiskAdaptor::closeFile() logs error if child DiskWriter::closeFile() throws exception. This exception is not rethrown. If at least one exception is caught, MultiDiskAdaptor::closeFile() throws new DlAbortEx. RequestGroupMan::closeFile() just logs exception and suppress each exception. Generally, don't call closeFile() in destructor. If you need to call it, it must suppress the exception.
Diffstat (limited to 'src/RequestGroupMan.cc')
-rw-r--r--src/RequestGroupMan.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/RequestGroupMan.cc b/src/RequestGroupMan.cc
index 34e9e127..6aeae42d 100644
--- a/src/RequestGroupMan.cc
+++ b/src/RequestGroupMan.cc
@@ -554,7 +554,11 @@ void RequestGroupMan::closeFile()
{
for(std::deque<SharedHandle<RequestGroup> >::const_iterator itr =
requestGroups_.begin(), eoi = requestGroups_.end(); itr != eoi; ++itr) {
- (*itr)->closeFile();
+ try {
+ (*itr)->closeFile();
+ } catch(RecoverableException& e) {
+ A2_LOG_ERROR_EX(EX_EXCEPTION_CAUGHT, e);
+ }
}
}