win_certificate_store - Fix exception handling typo (#52906)
(cherry picked from commit 1126f76d4d
)
This commit is contained in:
parent
788ba0b911
commit
441e4ff99f
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/win_certificate_store-excp.yaml
Normal file
2
changelogs/fragments/win_certificate_store-excp.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- win_certificate_store - Fix exception handling typo
|
|
@ -108,7 +108,7 @@ Function New-CertFile($cert, $path, $type, $password) {
|
|||
Fail-Json -obj $result -message "Failed to write cert to file, cert was null: $($_.Exception.Message)"
|
||||
} catch [System.IO.IOException] {
|
||||
Fail-Json -obj $result -message "Failed to write cert to file due to IO exception: $($_.Exception.Message)"
|
||||
} catch [System.UnauthorizedAccessException, System>Security.SecurityException] {
|
||||
} catch [System.UnauthorizedAccessException, System.Security.SecurityException] {
|
||||
Fail-Json -obj $result -message "Failed to write cert to file due to permission: $($_.Exception.Message)"
|
||||
} catch {
|
||||
Fail-Json -obj $result -message "Failed to write cert to file: $($_.Exception.Message)"
|
||||
|
|
Loading…
Reference in a new issue