SecretManagement.KeePass.Extension/Private/VaultError.ps1

1
2
3
4
5
6
7
8
9
10
function VaultError ([String]$Message) {
    <#
    .SYNOPSIS
    Takes a terminating error and first writes it as a non-terminating error to the user to better surface the issue.
    #>


    #FIXME: Use regular errors if https://github.com/PowerShell/SecretManagement/issues/102 is resolved
    Write-PSFMessage -Level Error "Vault ${VaultName}: $Message"
    throw "Vault ${VaultName}: $Message"
}