Expand Minimize

ErrorCategory Enumeration

Defines the error categories used to group errors for display purposes.


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

'Usage
Dim instance As ErrorCategory

public enum class ErrorCategory
public enum ErrorCategory
public enum ErrorCategory

Member nameDescription
AuthenticationErrorAn error that occurs when the user cannot be authenticated by the service. This could mean that the credentials are invalid or that the authentication system is not functioning properly.
CloseErrorAn error that occurs during closing.
ConnectionErrorAn error that occurs when a network connection that the operation depends on cannot be established or maintained.
DeadlockDetectedAn error that occurs when a deadlock is detected.
DeviceErrorAn error that occurs when a device reports an error.
FromStdErrAn error that occurs when a non-Windows PowerShell command reports an error to its STDERR pipe.
InvalidArgumentAn error that occurs when an argument that is not valid is specified.
InvalidDataAn error that occurs when data that is not valid is specified.
InvalidOperationAn error that occurs when an operation that is not valid is requested.
InvalidResultAn error that occurs when a result that is not valid is returned.
InvalidTypeAn error that occurs when a .NET Framework type that is not valid is specified.
LimitsExceededAn error that occurs when internal limits prevent the operation from being executed.
MetadataErrorAn error that occurs when metadata contains an error.
NotEnabledAn error that occurs when the operation attempts to use functionality that is currently disabled.
NotImplementedAn error that occurs when a referenced application programming interface (API) is not implemented.
NotInstalledAn error that occurs when an item is not installed.
NotSpecifiedAn unspecified error. Use only when not enough is known about the error to assign it to another error category. Avoid using this category if you have any information about the error, even if that information is incomplete.
ObjectNotFoundAn error that occurs when an object cannot be found.
OpenErrorAn error that occurs during opening.
OperationStoppedAn error that occurs when an operation has stopped. For example, the user interrupts the operation.
OperationTimeoutAn error that occurs when an operation has exceeded its timeout limit.
ParserErrorAn error that occurs when a parser encounters an error.
PermissionDeniedAn error that occurs when an operation is not permitted.
ProtocolErrorAn error that occurs when the contract of a protocol is not being followed. This error should not happen with well-behaved components.
QuotaExceededAn error that occurs when controls on the use of traffic or resources prevent the operation from being executed.
ReadErrorAn error that occurs during reading.
ResourceBusyAn error that occurs when a resource is busy.
ResourceExistsAn error that occurs when a resource already exists.
ResourceUnavailableAn error that occurs when a resource is unavailable.
SecurityErrorAn error that occurs when a security violation occurs. This field is introduced in Windows PowerShell 2.0.
SyntaxErrorAn error that occurs when a command is syntactically incorrect.
WriteErrorAn 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 Windows PowerShell Error Reporting.

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.


 

Target Platforms


Show:
© 2014 Microsoft