From 1d98baf902ca542f13c2fb7a75caf97f4d6ab5a0 Mon Sep 17 00:00:00 2001 From: Viliam Fiedler Date: Mon, 20 Jul 2026 17:15:42 +0200 Subject: [PATCH] Report failed render outputs truthfully --- src/DzScriptServerPane.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/DzScriptServerPane.cpp b/src/DzScriptServerPane.cpp index 8493c0e..70a8132 100644 --- a/src/DzScriptServerPane.cpp +++ b/src/DzScriptServerPane.cpp @@ -1934,7 +1934,9 @@ static QString buildRenderScript( // ── Render ──────────────────────────────────────────────────────────── script += - " renderMgr.doRender(opts);\n" + " if (!renderMgr.doRender(opts)) {\n" + " throw new Error(\"DAZ render manager reported failure\");\n" + " }\n" " return {success: true, output_path: outputPath};\n" "})();\n"; @@ -2582,6 +2584,18 @@ void DzScriptServerPane::processNextAsyncRequest() if (runResult.errorLine > 0) errorMsg = QString("Line %1: %2").arg(runResult.errorLine).arg(errorMsg); } + if (executed && isRender) { + const QVariantMap renderResult = scriptResult.toMap(); + const QString outputPath = renderResult.value("output_path").toString(); + const QFileInfo outputInfo(outputPath); + if (outputPath.isEmpty() || !outputInfo.isFile() || outputInfo.size() <= 0) { + executed = false; + errorMsg = outputPath.isEmpty() + ? "Render completed without declaring an output path" + : QString("Render completed without a non-empty output file: %1") + .arg(outputPath); + } + } QStringList capturedOutput = m_aCapturedLogLines; disconnect(dzApp, DSS_DEBUG_SIGNAL,