Invoke-KFException

Syntax

Invoke-KFException 
   [[-Message] <string>]
   [-SystemException[:$false]]
   [-ThrowErrors[:$true]]

Support

>= kenaflow 4.0.23

Return

Nothing.

Description

This cmdlet is for testing only.

Can be used to throw an exception from within a kenaflow cmdlet. The kenaflow cmdlet common parameter -ThrowErrors is used and therefore the current setting of Set-KFThrowErrorsPreference.

Parameters

[[-Message] <string>

Can be used to specify the exception message.

[-SystemException[:$false]]

If specified or :$true an System.Exception will be thrown.

If not specified or :$false a kenaflow exception of type kenaflow.KenaflowException will be thrown.

[-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

Invoke-KFCtrlC