mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-29 03:30:22 -07:00
Show the exception messages
This commit is contained in:
parent
2ed50d5e5b
commit
bd531f87bc
1 changed files with 3 additions and 3 deletions
|
@ -62,7 +62,7 @@ If ($force -or -not (Test-Path $dest)) {
|
||||||
$result.changed = $true
|
$result.changed = $true
|
||||||
}
|
}
|
||||||
Catch {
|
Catch {
|
||||||
Fail-Json $result "Error downloading $url to $dest"
|
Fail-Json $result "Error downloading $url to $dest $($_.Exception.Message)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Else {
|
Else {
|
||||||
|
@ -85,11 +85,11 @@ Else {
|
||||||
}
|
}
|
||||||
Catch [System.Net.WebException] {
|
Catch [System.Net.WebException] {
|
||||||
If ($_.Exception.Response.StatusCode -ne [System.Net.HttpStatusCode]::NotModified) {
|
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 {
|
Catch {
|
||||||
Fail-Json $result "Error downloading $url to $dest"
|
Fail-Json $result "Error downloading $url to $dest $($_.Exception.Message)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue