Commit e9e0ba9d authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

Parser: Handle exceptions thrown during IMetadataService::run()

When an exception is caught, mark the file as parsed, so we don't try to
parse it again during next run
parent ab9c0624
......@@ -122,7 +122,15 @@ void Parser::run()
task = m_tasks.front();
m_tasks.pop();
}
(*task->it)->run( task->file, task );
try
{
(*task->it)->run( task->file, task );
}
catch (const std::exception& ex)
{
LOG_ERROR( "Caught an exception during ", task->file->mrl(), " parsing: ", ex.what() );
done( task->file, IMetadataService::Status::Fatal, task );
}
}
LOG_INFO("Exiting Parser thread");
}
......
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