Improved error handling

This commit is contained in:
Markus Fleschutz
2021-02-16 10:03:20 +01:00
parent 05d3c4e6fc
commit cda05d0c9b
108 changed files with 116 additions and 116 deletions

View File

@ -35,6 +35,6 @@ try {
write-host -foregroundColor green "Done - magic packet sent twice to IP $IPaddress (MAC $MACaddress)"
exit 0
} catch {
write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}