Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion resources/PSScript/psscript.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ try {
} else {
"Script failed with terminating error: $($ps.InvocationStateInfo.Reason)"
}
Write-TraceQueue
Write-DscTrace -Now -Level Error -Message $message
exit 1
}
Expand All @@ -162,7 +163,6 @@ try {


if ($ps.HadErrors) {
# Errors can be non-terminating, so we just write a warning and continue
Write-DscTrace -Now -Level Debug -Message 'Non-terminating errors occurred during script execution.'
}

Expand All @@ -171,6 +171,7 @@ try {
}
}
catch {
Write-TraceQueue
Write-DscTrace -Now -Level Error -Message ($_ | Format-List -Force * | Out-String)
exit 1
}
Expand Down
Loading