win_certificate_store - Fix exception handling typo (#52906)

(cherry picked from commit 1126f76d4d)
This commit is contained in:
Jordan Borean 2019-02-25 13:00:04 +10:00 committed by Toshio Kuratomi
parent 788ba0b911
commit 441e4ff99f
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

@ -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)" Fail-Json -obj $result -message "Failed to write cert to file, cert was null: $($_.Exception.Message)"
} catch [System.IO.IOException] { } catch [System.IO.IOException] {
Fail-Json -obj $result -message "Failed to write cert to file due to IO exception: $($_.Exception.Message)" 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)" Fail-Json -obj $result -message "Failed to write cert to file due to permission: $($_.Exception.Message)"
} catch { } catch {
Fail-Json -obj $result -message "Failed to write cert to file: $($_.Exception.Message)" Fail-Json -obj $result -message "Failed to write cert to file: $($_.Exception.Message)"