2.2.3.15 ErrorRecord

This data type represents information about an error.

This data type is a Complex Object (section 2.2.5.2) with the following extended properties (section 2.2.5.2.9):

  • An optional higher-layer object that describes the error. Implementations of PSRP MUST NOT interpret this object.

  • An optional higher-layer object that caused the error. Implementations of PSRP MUST NOT interpret this object.

    • Property name: TargetObject.

    • Property type: Any Primitive Type Object (section 2.2.5.1) or Complex Object (section 2.2.5.2).

  • An optional higher-layer object describing what invocation caused the error. Implementations of PSRP MUST NOT interpret this object.

    • Property name: InvocationInfo.

    • Property type: A Complex Object encoded as specified in section 2.2.3.15.1.

  • A string which uniquely identifies this error condition.

  • Error category.

  • An optional string describing the activity that encountered the error.

  • An optional string describing the cause of the error.

    • Property name: ErrorCategory_Reason

    • Property type: Null Value (section 2.2.5.1.20) or String (section 2.2.5.1.1).

  • An optional string describing the object upon which the ErrorCategory_Activity has operated.

    • Property name: ErrorCategory_TargetName

    • Property type: Null Value (section 2.2.5.1.20) or String (section 2.2.5.1.1).

  • An optional string describing the type of the object upon which the ErrorCategory_Activity has operated.

    • Property name: ErrorCategory_TargetType

    • Property type: Null Value (section 2.2.5.1.20) or String (section 2.2.5.1.1).

  • An optional string describing the error.

    • Property name: ErrorCategory_Message

    • Property type: Null Value (section 2.2.5.1.20) or String (section 2.2.5.1.1).

  • An optional string describing the error. This property can be missing; when this property is missing, the condition MUST be treated in the same way as if the property had been set to the Null Value.

    • Property name: ErrorDetails_Message

    • Property type: Null Value (section 2.2.5.1.20) or String (section 2.2.5.1.1).

  • An optional string describing the recommended action the user can take. This property can be missing; when this property is missing, the condition MUST be treated in the same way as if the property had been set to the Null Value.

    • Property name: ErrorDetails_RecommendedAction

    • Property type: Null Value (section 2.2.5.1.20) or String (section 2.2.5.1.1).

  • Flag indicating if other (section 2.2.3.15.1) properties below have been included in the object or not.

    • Property name: SerializeExtendedInfo

    • Property type: Boolean (section 2.2.5.1.3). TRUE means that InvocationInfo-specific extended properties (section 2.2.3.15.1) are present in the ErrorRecord.

  • The status, when this record was created, of the pipeline provided by the higher-layer. This SHOULD be the same as value as InvocationInfo_PipelineIterationInfo (section 2.2.3.15.1). This property is present if and only if SerializeExtendedInfo property is TRUE.

The Complex Object described in this section SHOULD have the following type names (section 2.2.5.2.3):

  • System.Management.Automation.ErrorRecord

  • System.Object

For an example, see section 2.2.2.20.