Open feldrim opened 7 years ago
catch
as a guide to get the source of bug by the line number. Resource is this thread. Catch {Add-Content -Path $ScriptOutputLog,$ScriptOutputErrorLog -Value "ERROR:`t$($comp.name): Error $($_.InvocationInfo.InvocationName) Line $($_.InvocationInfo.ScriptLineNumber).`n$($_)"}