This commit is contained in:
Daniel Marjamäki 2022-05-17 22:17:51 +02:00
parent 8dbc1b802a
commit febd81d474
1 changed files with 8 additions and 2 deletions

View File

@ -328,8 +328,14 @@ static std::string executeAddon(const AddonInfo &addonInfo,
args += fileArg; args += fileArg;
std::string result; std::string result;
if (!executeCommand(pythonExe, split(args), redirect, &result)) if (!executeCommand(pythonExe, split(args), redirect, &result)) {
throw InternalError(nullptr, "Failed to execute addon (command: '" + pythonExe + " " + args + "')"); std::string message("Failed to execute addon (command: '" + pythonExe + " " + args + "'). Exitcode is nonzero.");
if (result.size() > 2) {
message = message + "\n" + message + "\nOutput:\n" + result;
message = message.substr(0,message.find_last_not_of("\n\r"));
}
throw InternalError(nullptr, message);
}
// Validate output.. // Validate output..
std::istringstream istr(result); std::istringstream istr(result);