major change to override Write-Error func

This commit is contained in:
2023-10-05 13:17:18 -04:00
parent bbb4884818
commit 5f4b4565de
42 changed files with 114 additions and 114 deletions
+3 -3
View File
@@ -11,10 +11,10 @@ Function Write-LineToFile {
If ( -not (Test-Path $Path) ) {
Write-Output "Creating file ""${Path}"""
Try { New-Item -Path $Path -ItemType File -Force | Out-Null }
Catch { LogErr $_.Exception.Message }
Catch { Write-Error $_.Exception.Message }
}
Try { Add-Content -Path $Path -Value $Line }
Catch { LogErr $_.Exception.Message }
Catch { Write-Error $_.Exception.Message }
}
## Function to test whether or not an item has a specified property
@@ -68,7 +68,7 @@ Function Get-ItemPropertyInfo {
## Set $retval to a standard datetime format
$retval = $date.ToString('yyyy-MM-dd')
}
Catch { LogErr $_.Exception.Message; $retval = $origRetval }
Catch { Write-Error $_.Exception.Message; $retval = $origRetval }
}
Default {}
}