LxLeChat / FlowChartCore

PowerShell Module Written in C# to create DOT graphs from PS Scripts
MIT License
18 stars 3 forks source link

Get-FlowChartNode : Gestion des erreurs lors de la lecture des fichiers #100

Closed LaurentDardenne closed 10 months ago

LaurentDardenne commented 3 years ago

Le comportement est 'différent' pour ces deux appels :

Get-FLowChartNode '.\build.ps1','.\buid.ps1'
#node ..
#Get-FLowChartNode: Cannot find path 'G:\PS\FlowChartCore\buid.ps1' because it does not exist.

Get-FLowChartNode '.\buid.ps1','.\build.ps1'
#Get-FLowChartNode: Cannot find path 'G:\PS\FlowChartCore\buid.ps1' because it does not exist.

Le premier exemple traite le premier fichier et échoue sur le second, le traitement s'arrête. Le second exemple échoue à traiter le premier fichier, le traitement s'arrête.

A voir si ici une erreur doit être bloquant ou pas. A mon avis ce type d'erreur ne doit pas être bloquant, sinon ajouter ce comportement via la paramètre -Strict

Strict Data type: SwitchParameter | Implement this parameter so that all errors are handled as terminating errors when the parameter is specified.

LxLeChat commented 3 years ago

tout à fait, cela ne devrait pas être bloquant. je vais checker