6
Quand devrais-je utiliser Write-Error contre Throw? Erreurs terminales et non terminales
En regardant un script Get-WebFile sur PoshCode, http://poshcode.org/3226 , j'ai remarqué cet étrange engin: $URL_Format_Error = [string]"..." Write-Error $URL_Format_Error return Quelle en est la raison par opposition à la suivante? $URL_Format_Error = [string]"..." Throw $URL_Format_Error Ou encore mieux: $URL_Format_Error = New-Object System.FormatException "..." Throw $URL_Format_Error Si je comprends bien, vous …