- Knowledge base
 - powerEvents
 - Troubleshooting
 
Add-VaultTab: Using try catch finally in a button action emtpies the tab content
Issue
When using a try catch finally block in a button action inside of the Add-VaultTab Cmdlet like in the example below an Unhandled exception is logged in the logfile and the contents of the tab disappear
$tab_control.FindName('Button').Add_Click({ 
    try { 
        throw("This is an error") 
    } catch { 
        
    } finally {
    } 
})
Cause
Currently under investigation
Solution
The issue happens only with the "finally" block. Remove the finally block from the try catch block.