Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ErrorCategoryInfo Class

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Contains auxiliary information about an ErrorRecord.

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

System::Object
  System.Management.Automation::ErrorCategoryInfo

public ref class ErrorCategoryInfo 

NameDescription
System_CAPS_pubpropertyActivity

Gets and sets the description of the activity that caused the error.

System_CAPS_pubpropertyCategory

Gets the error category for the error.

System_CAPS_pubpropertyReason

Gets and sets a description of the reason for the error.

System_CAPS_pubpropertyTargetName

Gets and sets the name of the object that was being processed when the error occurred.

System_CAPS_pubpropertyTargetType

Gets and sets the .NET Framework type of the object that was targeted by the operation that encountered the error.

NameDescription
System_CAPS_pubmethodEquals(Object^)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetMessage()

Gets a description of the error in the CategoryView style.

System_CAPS_pubmethodGetMessage(CultureInfo^)

Gets a description of the error in the CategoryView style along with the culture used to display the description.

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string representation of the ErrorCategoryInfo object.(Overrides Object::ToString().)

Windows PowerShell displays error information when the $ErrorView variable is set to "CategoryView". The category view string contains the following information.

{Category}: ({TargetName}:{TargetType}):[{Activity}], {Reason}

Where:

Category

Windows PowerShell defined ErrorCategory constant used to display errors by their cause.

Target name

The name of the target object that was being processed when the error occurred (default) or some other cmdlet-defined string.

Target name

The name of the target object that was being processed when the error occurred (default) or some other cmdlet-defined string.

Target type

The .NET Framework type of the target object (default) or some other cmdlet-defined string.

Activity

The name of the cmdlet that created the error record (default) or some other cmdlet-defined string.

Reason

The exception type (default) or some other cmdlet-defined string.

For more information about the error category information of an error record, see Windows PowerShell Error Records.

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: