Examples/Safe_SensitiveErrorExposure_1.ps1

function Show-ErrorSafe {
    param($value)

    try {
        [int]::Parse($value) | Out-Null
    }
    catch {
        Write-Output "An error has occurred."
    }
}