Improve the error message line

This commit is contained in:
Markus Fleschutz
2022-04-13 12:06:32 +02:00
parent 2e86cb0fa4
commit 04738077fe
284 changed files with 293 additions and 294 deletions

View File

@ -178,6 +178,6 @@ try {
ListTools | Format-Table -property @{e='Name';width=12},@{e='Version';width=15},@{e='Location';width=55},@{e='FileSize';width=10}
exit 0 # success
} catch {
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}