IContainsErrorRecord.ErrorRecord Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This is the ErrorRecord which provides additional information about the error.
public:
property System::Management::Automation::ErrorRecord ^ ErrorRecord { System::Management::Automation::ErrorRecord ^ get(); };
public System.Management.Automation.ErrorRecord ErrorRecord { get; }
member this.ErrorRecord : System.Management.Automation.ErrorRecord
Public ReadOnly Property ErrorRecord As ErrorRecord
Property Value
Remarks
The ErrorRecord instance returned by ErrorRecord should contain in its Exception property an instance of ParentContainsErrorRecordException rather than a reference to the root exception. This prevents a recursive reference between the exception implementing IContainsErrorRecord and the ErrorRecord. Use the ParentContainsErrorRecordException(Exception) constructor so that the ParentContainsErrorRecordException will have the same Message as the root exception.