ErrorDetails ErrorDetails ErrorDetails Class

Definition

additional details about an ErrorRecord

public class ErrorDetails : System.Runtime.Serialization.ISerializable
type ErrorDetails = class
    interface ISerializable
Public Class ErrorDetails
Implements ISerializable
Inheritance
ErrorDetailsErrorDetailsErrorDetails
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 ErrorDetails but there is no established scenario for doing this, nor has it been tested.

Constructors

ErrorDetails(String) ErrorDetails(String) ErrorDetails(String)

Creates an instance of ErrorDetails specifying a Message.

ErrorDetails(SerializationInfo, StreamingContext) ErrorDetails(SerializationInfo, StreamingContext) ErrorDetails(SerializationInfo, StreamingContext)

Initializes a new instance of the ErrorDetails class using data serialized via ISerializable

ErrorDetails(Cmdlet, String, String, Object[]) ErrorDetails(Cmdlet, String, String, Object[]) ErrorDetails(Cmdlet, String, String, Object[])

Creates an instance of ErrorDetails specifying a Message. This variant is used by cmdlets.

ErrorDetails(IResourceSupplier, String, String, Object[]) ErrorDetails(IResourceSupplier, String, String, Object[]) ErrorDetails(IResourceSupplier, String, String, Object[])

Creates an instance of ErrorDetails specifying a Message. This variant is used by CmdletProviders.

ErrorDetails(Assembly, String, String, Object[]) ErrorDetails(Assembly, String, String, Object[]) 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 Message Message

Message which replaces Message in Exception

RecommendedAction RecommendedAction 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) GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext)

Serializer for ISerializable

ToString() ToString() ToString()

As ToString()

Applies to