Skip to content

Latest commit

 

History

History
89 lines (59 loc) · 2.58 KB

HelpersWriteChocolateyFailure.md

File metadata and controls

89 lines (59 loc) · 2.58 KB

Write-ChocolateyFailure

DEPRECATED - DO NOT USE.

Syntax

Write-ChocolateyFailure `
  [-PackageName <String>] `
  [-FailureMessage <String>] `
  [-IgnoredArguments <Object[]>] [<CommonParameters>]

Description

Throws the error message as an error.

Notes

This has been deprecated and is no longer useful as of 0.9.9. Instead please just use throw $_.Exception when catching errors. Although try/catch is no longer necessary unless you want to do some error handling.

Aliases

None

Inputs

None

Outputs

None

Parameters

-PackageName [<String>]

The name of the package - while this is an arbitrary value, it's recommended that it matches the package id.

Property Value
Aliases
Required? false
Position? 1
Default Value
Accept Pipeline Input? false

-FailureMessage [<String>]

The message to throw an error with.

Property Value
Aliases
Required? false
Position? 2
Default Value
Accept Pipeline Input? false

-IgnoredArguments [<Object[]>]

Allows splatting with arguments that do not apply. Do not use directly.

Property Value
Aliases
Required? false
Position? 3
Default Value
Accept Pipeline Input? false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters http://go.microsoft.com/fwlink/p/?LinkID=113216 .

Links

  • [[Write-ChocolateySuccess|HelpersWriteChocolateySuccess]]

[[Function Reference|HelpersReference]]

NOTE: This documentation has been automatically generated from Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Write-ChocolateyFailure -Full.

View the source for Write-ChocolateyFailure