mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-17 16:11:22 +02:00
Improved error handling
This commit is contained in:
@ -19,6 +19,6 @@ try {
|
||||
& ./speak-english.ps1 "$Joke"
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
||||
|
Reference in New Issue
Block a user