1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Show the exception messages

This commit is contained in:
Andrew Briening 2015-07-16 15:01:09 -04:00 committed by Matt Clay
parent 2ed50d5e5b
commit bd531f87bc

View file

@ -62,7 +62,7 @@ If ($force -or -not (Test-Path $dest)) {
$result.changed = $true
}
Catch {
Fail-Json $result "Error downloading $url to $dest"
Fail-Json $result "Error downloading $url to $dest $($_.Exception.Message)"
}
}
Else {
@ -85,11 +85,11 @@ Else {
}
Catch [System.Net.WebException] {
If ($_.Exception.Response.StatusCode -ne [System.Net.HttpStatusCode]::NotModified) {
Fail-Json $result "Error downloading $url to $dest"
Fail-Json $result "Error downloading $url to $dest $($_.Exception.Message)"
}
}
Catch {
Fail-Json $result "Error downloading $url to $dest"
Fail-Json $result "Error downloading $url to $dest $($_.Exception.Message)"
}
}