Commit 499261b3 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

ml factory: Ensure no exception is thrown

parent 46194099
......@@ -28,5 +28,13 @@
extern "C" medialibrary::IMediaLibrary* NewMediaLibrary()
{
return new medialibrary::MediaLibrary();
try
{
return new medialibrary::MediaLibrary();
}
catch ( const std::exception& ex )
{
LOG_ERROR( "Failed to instantiate medialibrary: ", ex.what() );
}
return nullptr;
}
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