powercli.exceptions

Exceptions/Errors used by PowerCLI.

Module Contents

API

exception powercli.exceptions.ConversionError

Bases: Exception

An error that occurred while converting a value.

Initialization

Initialize self. See help(type(self)) for accurate signature.

raw: str

None

The raw input value that could not be converted.

converter: powercli.typedefs.Converter[Any]

None

The function that is supposed to convert the value.

exception powercli.exceptions.MissingValueError

Bases: Exception

A flag expected a value that was not provided by the user.

Initialization

Initialize self. See help(type(self)) for accurate signature.

flag: powercli.args.Flag[Any, Any, Any]

None

The flag that expected a value.

index: int

None

The index of the missing value.

name: str

None

The name of the missing value.

exception powercli.exceptions.MissingPositionalError

Bases: Exception

The user did not provide a required positional.

Initialization

Initialize self. See help(type(self)) for accurate signature.

positional: powercli.args.Positional[Any, Any, Any]

None

The positional that was missing.

exception powercli.exceptions.TooFewPositionalsError

Bases: Exception

The user did not provide enough positionals.

Initialization

Initialize self. See help(type(self)) for accurate signature.

positional: powercli.args.VariadicPositional[Any, Any, Any]

None

The variadic positional that expects values.

amount: int

None

The amount of values that were provided.

exception powercli.exceptions.MissingFlagError

Bases: Exception

The user did not provide a required flag.

Initialization

Initialize self. See help(type(self)) for accurate signature.

flag: powercli.args.Flag[Any, Any, Any]

None

The flag that was missing.

exception powercli.exceptions.MissingDependencyError

Bases: Exception

A dependency of an argument is missing.

Initialization

Initialize self. See help(type(self)) for accurate signature.

arg: powercli.args.Argument

None

The argument with a dependency.

dependencies: set[str]

None

The set of identifiers which arg depends on.