Skip to content

Commit

Permalink
Update Video - Inject HDR10+ metadata.js
Browse files Browse the repository at this point in the history
Changed order of error processing to help catch unrecognised errors
  • Loading branch information
CanOfSocks authored Sep 18, 2023
1 parent 26e7463 commit a3f4797
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions Scripts/Flow/Video/Video - Inject HDR10+ metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,19 @@ function Script(FailFlowOnNoInject) {
}

function processLogs(process, FailFlowOnNoInject) {
if (process.standardOutput) {
//catch errors in stdout
if (`${process.standardOutput}`.toLowerCase().includes("error") && FailFlowOnNoInject && process.exitCode === 0) {
//Logger.ILog("Exit code: " + process.exitCode)
if (process.exitCode !== 0) {
Logger.ELog('Failed with errorcode: ' + process.exitCode);
if (FailFlowOnNoInject) {
Logger.ILog("Failing flow")
return -1;
}
else{
return 0;
else {
Logger.ILog("Continuing flow execution")
return 2;
}
}
}

if (process.standardError) {
Logger.ELog('Standard error: ' + process.standardError);
if (FailFlowOnNoInject) {
Expand All @@ -131,16 +135,18 @@ function processLogs(process, FailFlowOnNoInject) {
return 2;
}
}

if (process.exitCode !== 0) {
Logger.ELog('Failed with errorcode: ' + process.exitCode);
if (FailFlowOnNoInject) {
Logger.ILog("Failing flow")

if (process.standardOutput) {
//catch errors in stdout
if (`${process.standardOutput}`.toLowerCase().includes("error") && FailFlowOnNoInject && process.exitCode === 0) {
return -1;
}
else {
Logger.ILog("Continuing flow execution")
else if(/error/i.test(process.standardOutput) === true && process.exitCode === 0){
return 2;
}
else{
return 0;
}
}
}

}

0 comments on commit a3f4797

Please sign in to comment.