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

@@ -15,6 +15,6 @@ try {
(Invoke-WebRequest -Uri "https://earthquake.usgs.gov/fdsnws/event/1/query?format=$Format&minmagnitude=$MinMagnitude&orderby=$OrderBy" -UserAgent "curl" ).Content
exit 0
} catch {
write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}