Commit ecab63d7 authored by Alexander Wiebel's avatar Alexander Wiebel

[FIX #33 (old #520)] handle wrong label file format correctly

parent e02a81ae
......@@ -367,6 +367,8 @@ void WMAtlasSurfaces::loadLabels( std::string fileName )
std::vector<std::string>svec;
try
{
for( size_t i = 0; i < lines.size(); ++i )
{
svec.clear();
......@@ -384,6 +386,16 @@ void WMAtlasSurfaces::loadLabels( std::string fileName )
}
}
m_labelsLoaded = true;
}
catch( const std::exception& e )
{
// print this message AFTER creation of WException to have the backtrace before the message
WLogger::getLogger()->addLogMessage(
std::string( "Problem while loading label file. Probably not suitable content. Message: " ) + e.what(),
"Module (" + getName() + ")", LL_ERROR );
m_labels.clear();
m_labelsLoaded = false;
}
}
void WMAtlasSurfaces::createRoi()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment