ErrorDetails
Class
Definition
additional details about an ErrorRecord
public class ErrorDetails : System.Runtime.Serialization.ISerializable
- Inheritance
-
ErrorDetails
- Implements
Remarks
ErrorDetails represents additional details about an ErrorRecord, starting with a replacement Message. Clients can use ErrorDetails when they want to display a more specific Message than the one contained in a particular Exception, without having to create a new Exception or define a new Exception class.
It is permitted to subclass <xref href="System.Management.Automation.ErrorDetails"></xref>
but there is no established scenario for doing this, nor has it been tested.
Constructors
| ErrorDetails(String) |
Creates an instance of ErrorDetails specifying a Message. |
| ErrorDetails(SerializationInfo, StreamingContext) |
Initializes a new instance of the ErrorDetails class using data serialized via ISerializable |
| ErrorDetails(Cmdlet, String, String, Object[]) |
Creates an instance of ErrorDetails specifying a Message. This variant is used by cmdlets. |
| ErrorDetails(IResourceSupplier, String, String, Object[]) |
Creates an instance of ErrorDetails specifying a Message. This variant is used by CmdletProviders. |
| ErrorDetails(Assembly, String, String, Object[]) |
Creates an instance of ErrorDetails specifying a Message. This variant is used by other code without a reference to a Cmdlet or CmdletProvider instance. |
Properties
| Message | |
| RecommendedAction |
Text describing the recommended action in the event that this error occurs. This is empty unless the code which generates the error specifies it explicitly. |
Methods
| GetObjectData(SerializationInfo, StreamingContext) |
Serializer for ISerializable |
| ToString() |
As ToString() |