Improve error message when parsing a plugin failed

This commit is contained in:
Maschell
2023-08-16 10:18:02 +02:00
parent 07de996bf9
commit 1e7c77b39f
8 changed files with 51 additions and 23 deletions

View File

@@ -2,7 +2,7 @@
#include "utils/logger.h"
#include "utils/utils.h"
PluginData::PluginData(const std::vector<uint8_t> &input) : length(input.size()) {
PluginData::PluginData(const std::vector<uint8_t> &input, std::string source) : length(input.size()), mSource(std::move(source)) {
auto data_copy = make_unique_nothrow<uint8_t[]>(length);
if (!data_copy) {
DEBUG_FUNCTION_LINE_ERR("Failed to allocate space on default heap");