ErrorCategory Enumeration
TOC
Collapse the table of content
Expand the table of content

ErrorCategory Enumeration

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Errors reported by Monad will be in one of these categories.

Namespace:   System.Management.Automation
Assembly:  System.Management.Automation (in System.Management.Automation.dll)

public enum class ErrorCategory

Member nameDescription
AuthenticationError

Could not authenticate the user to the service. Could mean that the credentials are invalid or the authentication system is not functioning properly.

CloseError

An error that occurs during closing.

ConnectionError

The operation depends on a network connection that cannot be established or maintained.

DeadlockDetected

An error that occurs when a deadlock is detected.

DeviceError

An error that occurs when a device reports an error.

FromStdErr

A non-Monad command reported an error to its STDERR pipe.

InvalidArgument

An error that occurs when an argument that is not valid is specified.

InvalidData

An error that occurs when data that is not valid is specified.

InvalidOperation

An error that occurs when an operation that is not valid is requested.

InvalidResult

An error that occurs when a result that is not valid is returned.

InvalidType

An error that occurs when a .NET Framework type that is not valid is specified.

LimitsExceeded

Internal limits prevent the operation from being executed.

MetadataError

An error that occurs when metadata contains an error.

NotEnabled

The operation attempted to use functionality that is currently disabled.

NotImplemented

An error that occurs when a referenced application programming interface (API) is not implemented.

NotInstalled

An error that occurs when an item is not installed.

NotSpecified

No error category is specified, or the error category is invalid.

ObjectNotFound

Object cannot be found (file, directory, computer, system resource, etc.)

OpenError

An error that occurs during opening.

OperationStopped

An error that occurs when an operation has stopped. For example, the user interrupts the operation.

OperationTimeout

An error that occurs when an operation has exceeded its timeout limit.

ParserError

An error that occurs when a parser encounters an error.

PermissionDenied

An error that occurs when an operation is not permitted.

ProtocolError

The contract of a protocol is not being followed. Should not happen with well-behaved components.

QuotaExceeded

Controls on the use of traffic or resources prevent the operation from being executed.

ReadError

An error that occurs during reading.

ResourceBusy

An error that occurs when a resource is busy.

ResourceExists

An error that occurs when a resource already exists.

ResourceUnavailable

An error that occurs when a resource is unavailable.

SecurityError

Used for security exceptions

SyntaxError

An error that occurs when a command is syntactically incorrect.

WriteError

An error that occurs during writing.

Windows PowerShell displays errors based on these categories when the $ErrorView shell variable is set to CategoryView. Cmdlet developers should choose between these categories whenever possible to ensure consistency when reporting errors. For more information, see Error Reporting Concepts.

Avoid specifying the NotSpecified constant when creating an ErrorRecord object, even if none of the constants defined by this enumeration matches perfectly the error you are reporting. Instead, choose the best match.

Return to top

Community Additions

ADD
Show:
© 2016 Microsoft