mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-19 08:52:05 +02:00
Enhance the error message
This commit is contained in:
@@ -14,6 +14,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: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
||||
|
Reference in New Issue
Block a user