Error categories allow to group errors.
Displaying available error categories
The available error categories can be displayed in
PowerShell with the following
pipeline:
[System.Enum]::GetValues([System.Management.Automation.ErrorCategory]) |
sort-object { $_.ToString()} |
select-object { $_.ToString(), $_.value__ }
AuthenticationError | 28 |
CloseError | 2 |
ConnectionError | 27 |
DeadlockDetected | 4 |
DeviceError | 3 |
FromStdErr | 24 |
InvalidArgument | 5 |
InvalidData | 6 |
InvalidOperation | 7 |
InvalidResult | 8 |
InvalidType | 9 |
LimitsExceeded | 29 |
MetadataError | 10 |
NotEnabled | 31 |
NotImplemented | 11 |
NotInstalled | 12 |
NotSpecified | 0 |
ObjectNotFound | 13 |
OpenError | 1 |
OperationStopped | 14 |
OperationTimeout | 15 |
ParserError | 17 |
PermissionDenied | 18 |
ProtocolError | 26 |
QuotaExceeded | 30 |
ReadError | 22 |
ResourceBusy | 19 |
ResourceExists | 20 |
ResourceUnavailable | 21 |
SecurityError | 25 |
SyntaxError | 16 |
WriteError | 23 |