Get-KFThrowErrorsPreference
Syntax
Get-KFThrowErrorsPreference
[-ThrowErrors[:$true]]
Support
>= kenaflow 2.0.0
Return
Boolean.
Description
This cmdlet returns the current setting for error handling. This can be set at the level of the workflow script by with Set-KFThrowErrorsPreference
. The workflows default is read from _wfconfig.ps1
.
Please read article Error Handling.
Parameters
[-ThrowErrors[:$true]]
This is a default parameter for all kenaflow cmdlets. If set to
$true
(default!) the engine will pass exception within the cmdlet to the script for further handling.
Example
$errorHandling = Get-KFThrowErrorsPreference
if($errorHandling) {
Write-KFLog "Errors are thrown to PowerShell"
} else {
Write-KFLog "Errors ere not thrown to PowerShell"
}