diff --git a/RTCP/Cobalt/OutputProc/src/MeasurementSetFormat.cc b/RTCP/Cobalt/OutputProc/src/MeasurementSetFormat.cc index dac5383e4f9bc786cb312488b4408b48a60e3079..6439e976674fbfe93239a2be55214fd2c687f159 100644 --- a/RTCP/Cobalt/OutputProc/src/MeasurementSetFormat.cc +++ b/RTCP/Cobalt/OutputProc/src/MeasurementSetFormat.cc @@ -119,6 +119,9 @@ namespace LOFAR MeasurementSetFormat::~MeasurementSetFormat() { + ScopedLock scopedLock(sharedMutex); + + itsMS = 0; } @@ -132,6 +135,9 @@ namespace LOFAR /// Next make a metafile which describes the raw datafile we're /// going to write createMSMetaFile(MSname, subband); + + // Release itsMS, we don't need it anymore + itsMS = 0; } diff --git a/RTCP/Cobalt/OutputProc/src/OutputThread.cc b/RTCP/Cobalt/OutputProc/src/OutputThread.cc index e972dfdc5ac9e658b957092c23c0fd19fd15fafd..689d8396545b905a1430fda569650cd100236dbc 100644 --- a/RTCP/Cobalt/OutputProc/src/OutputThread.cc +++ b/RTCP/Cobalt/OutputProc/src/OutputThread.cc @@ -172,6 +172,15 @@ namespace LOFAR if (!itsParset.settings.realTime) THROW(StorageException, ex); +#if defined HAVE_AIPSPP + } + catch (casa::AipsError &ex) + { + LOG_ERROR_STR(itsLogPrefix << "Could not create meta data (AipsError): " << ex.what()); + + if (!itsParset.settings.realTime) + THROW(StorageException, ex.what()); +#endif } } @@ -188,6 +197,15 @@ namespace LOFAR if (!itsParset.settings.realTime) THROW(StorageException, ex); +#if defined HAVE_AIPSPP + } + catch (casa::AipsError &ex) + { + LOG_ERROR_STR(itsLogPrefix << "Could not add final meta data (AipsError): " << ex.what()); + + if (!itsParset.settings.realTime) + THROW(StorageException, ex.what()); +#endif } }