PowerShell provides two different ways to handle terminating errors: using try-catch-finally, or using trap.