Gumby.Debug.psm1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<#
.SYNOPSIS
Asserts a condition.
 
.PARAMETER Condition
Value representing the condition.
 
.PARAMETER Message
Message to fail execution with if the condition is not true.
#>

function Assert($Condition, $Message = "failed assertion") {
    if (!$Condition) { throw $Message }
}