[casacore] r21170 committed - Catch failing remove

0 views
Skip to first unread message

casa...@googlecode.com

unread,
Jan 4, 2012, 7:04:14 AM1/4/12
to casacor...@googlegroups.com
Revision: 21170
Author: gervandiepen
Date: Wed Jan 4 04:03:36 2012
Log: Catch failing remove

http://code.google.com/p/casacore/source/detail?r=21170

Modified:
/trunk/images/Images/test/tImageReorderer.cc

=======================================
--- /trunk/images/Images/test/tImageReorderer.cc Tue Oct 18 00:39:05 2011
+++ /trunk/images/Images/test/tImageReorderer.cc Wed Jan 4 04:03:36 2012
@@ -320,9 +320,16 @@
ok = False;
cerr << "Exception caught: " << x.getMesg() << endl;
}
+
+ // Try to remove the created files.
+ try {
if(workdir.exists()) {
workdir.removeRecursive();
}
+ } catch (AipsError x) {
+ cerr << "Remove exception caught: " << x.getMesg() << endl;
+ }
+
return ok ? 0 : 1;
}

Reply all
Reply to author
Forward
0 new messages