Improved the error message

This commit is contained in:
Markus Fleschutz
2020-12-09 09:30:55 +00:00
parent 30eccba205
commit f771cf7441
36 changed files with 152 additions and 77 deletions

View File

@ -14,5 +14,7 @@ try {
(Get-ChildItem $DirTree -recurse | ? {$_.PSIsContainer -eq $True}) | ?{$_.GetFileSystemInfos().Count -eq 0} | select FullName
echo "Done."
exit 0
} catch { Write-Error $Error[0] }
exit 1
} catch {
Write-Error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}