win_certificate_store - Fix exception handling typo (#52906)

This commit is contained in:
Jordan Borean 2019-02-25 13:00:04 +10:00 committed by GitHub
parent 3635c59b23
commit 1126f76d4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- win_certificate_store - Fix exception handling typo

View file

@ -109,7 +109,7 @@ Function New-CertFile($module, $cert, $path, $type, $password) {
$module.FailJson("Failed to write cert to file, cert was null: $($_.Exception.Message)", $_)
} catch [System.IO.IOException] {
$module.FailJson("Failed to write cert to file due to IO Exception: $($_.Exception.Message)", $_)
} catch [System.UnauthorizedAccessException, System>Security.SecurityException] {
} catch [System.UnauthorizedAccessException, System.Security.SecurityException] {
$module.FailJson("Failed to write cert to file due to permissions: $($_.Exception.Message)", $_)
} catch {
$module.FailJson("Failed to write cert to file: $($_.Exception.Message)", $_)