CleanCode logo
sitemap
SEARCH:

CleanCode PowerShell Libraries v1.2.08 API: CleanCode » Assertion » Set-AbortOnError

Set-AbortOnError

NAME

Set-AbortOnError

SYNOPSIS

Adjusts Assert-Expression to throw an exception on a failure rather than to just report the failure.

SYNTAX

Set-AbortOnError [[-state] <Boolean>] [<CommonParameters>]

DESCRIPTION

Normally, Assert-Expression simply reports test results to the console. Enabling abort-on-error with the Set-AbortOnError function modifies the behavior to throw exceptions on each failure instead.

PARAMETERS

-state <Boolean>
        A Boolean indicating to enable or disable abort-on-error.

        Required?                    false
        Position?                    1
        Default value                False
        Accept pipeline input?       false
        Accept wildcard characters?  false

<CommonParameters>
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer and OutVariable. For more information, see 
        about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 

INPUTS

None. You cannot pipe objects to Set-AbortOnError.

OUTPUTS

None. Set-AbortOnError does not generate any output.

NOTES



        This function is part of the CleanCode toolbox
        from http://cleancode.sourceforge.net/.

        Since CleanCode 1.1.01.

EXAMPLES


-------------------------- EXAMPLE 1 --------------------------

PS>Set-AbortOnError $true

Enables abort-on-error.

RELATED LINKS

This documentation set was created with CleanCode's DocTreeGenerator.

Valid XHTML 1.0!Valid CSS!Get CleanCode at SourceForge.net. Fast, secure and Free Open Source software downloads
Copyright © 2001-2015 Michael Sorens • Contact usPrivacy Policy
Usage governed by Mozilla Public License 1.1 and CleanCode Courtesy License
CleanCode -- The Website for Clean DesignRevised 2015.12.16