ErrorRecord Class
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Describes a terminating or nonterminating error that occurred during the processing of a command.
Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation)
System.Management.Automation Namespace
Error
IContainsErrorRecord Interface
Cmdlet.ThrowTerminatingError Method
VariableProvider.ThrowTerminatingError Method
Cmdlet.WriteError Method
VariableProvider.WriteError Method
Windows PowerShell SDK
Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation)
The ErrorRecord class is used only by the Windows PowerShell runtime. There are no established scenarios for deriving from this class. For more information about error records, see Windows PowerShell Error Records.
Error records that describe terminating errors are reported when the Cmdlet.ThrowTerminatingError method and the CmdletProvider.ThrowTerminatingError method are called.
Error records that describe nonterminating errors are reported by calling the Cmdlet.WriteError method and the CmdletProvider.WriteError method.
Error records are also used by several exceptions that are thrown by the Windows PowerShell runtime.
System.Object
System.Management.Automation.ErrorRecord
System.Management.Automation.Runspaces.RemotingErrorRecord
System.Management.Automation.ErrorRecord
System.Management.Automation.Runspaces.RemotingErrorRecord
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Target Platforms
Windows Developer Preview, Windows Server Developer PreviewReference
ErrorRecord MembersSystem.Management.Automation Namespace
Error
IContainsErrorRecord Interface
Cmdlet.ThrowTerminatingError Method
VariableProvider.ThrowTerminatingError Method
Cmdlet.WriteError Method
VariableProvider.WriteError Method
Other Resources
Windows PowerShell Error RecordsWindows PowerShell SDK
Send comments about this topic to Microsoft.