Add support for notifications on error

This commit is contained in:
Maschell
2023-08-16 10:08:44 +02:00
parent efcde57f74
commit 07de996bf9
12 changed files with 165 additions and 5 deletions

View File

@@ -15,6 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/
#include "PluginDataFactory.h"
#include "NotificationsUtils.h"
#include "fs/FSUtils.h"
#include "utils/StringTools.h"
#include "utils/logger.h"
@@ -54,7 +55,9 @@ std::forward_list<std::shared_ptr<PluginData>> PluginDataFactory::loadDir(const
if (pluginData) {
result.push_front(std::move(pluginData.value()));
} else {
DEBUG_FUNCTION_LINE_ERR("Failed to load plugin: %s", full_file_path.c_str());
auto errMsg = string_format("Failed to load plugin: %s", full_file_path.c_str());
DEBUG_FUNCTION_LINE_ERR("%s", errMsg.c_str());
DisplayErrorNotificationMessage(errMsg, 15.0f);
}
}