Skip to content
Snippets Groups Projects
Commit 6ff0ce75 authored by Jan David Mol's avatar Jan David Mol
Browse files

Task #4818: Catch feedback/augment exceptions in the OutputThread, to make...

Task #4818: Catch feedback/augment exceptions in the OutputThread, to make GPUProcIO code a bit cleaner
parent 839b36a4
No related branches found
No related tags found
No related merge requests found
......@@ -175,18 +175,9 @@ void process(Stream &controlStream, size_t myRank)
LOG_INFO_STR("Processing final meta data");
for (size_t i = 0; i < subbandWriters.size(); ++i)
try {
subbandWriters[i]->augment(finalMetaData);
} catch (Exception &ex) {
LOG_ERROR_STR("Could not add final meta data: " << ex);
}
for (size_t i = 0; i < tabWriters.size(); ++i)
try {
tabWriters[i]->augment(finalMetaData);
} catch (Exception &ex) {
LOG_ERROR_STR("Could not add final meta data: " << ex);
}
/*
* LTA FEEDBACK
......@@ -196,17 +187,9 @@ void process(Stream &controlStream, size_t myRank)
Parset feedbackLTA;
for (size_t i = 0; i < subbandWriters.size(); ++i)
try {
feedbackLTA.adoptCollection(subbandWriters[i]->feedbackLTA());
} catch (Exception &ex) {
LOG_ERROR_STR("Could not obtain feedback for LTA: " << ex);
}
for (size_t i = 0; i < tabWriters.size(); ++i)
try {
feedbackLTA.adoptCollection(tabWriters[i]->feedbackLTA());
} catch (Exception &ex) {
LOG_ERROR_STR("Could not obtain feedback for LTA: " << ex);
}
LOG_INFO_STR("Forwarding LTA feedback");
feedbackLTA.write(&controlStream);
......
......@@ -171,17 +171,26 @@ namespace LOFAR
template<typename T> void OutputThread<T>::augment( const FinalMetaData &finalMetaData )
{
try {
// augment the data product
ASSERT(itsWriter.get());
itsWriter->augment(finalMetaData);
} catch (Exception &ex) {
LOG_ERROR_STR(itsLogPrefix << "Could not add final meta data: " << ex);
}
}
template<typename T> ParameterSet OutputThread<T>::feedbackLTA() const
{
ParameterSet result;
try {
result.adoptCollection(itsWriter->configuration(), itsLTAfeedbackPrefix);
} catch (Exception &ex) {
LOG_ERROR_STR(itsLogPrefix << "Could not obtain feedback for LTA: " << ex);
}
return result;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment