ErrorDetails Class
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.
Additional details about an ErrorRecord
public ref class ErrorDetails : System::Runtime::Serialization::ISerializable
[System.Serializable]
public class ErrorDetails : System.Runtime.Serialization.ISerializable
public class ErrorDetails : System.Runtime.Serialization.ISerializable
[<System.Serializable>]
type ErrorDetails = class
interface ISerializable
type ErrorDetails = class
interface ISerializable
Public Class ErrorDetails
Implements ISerializable
- Inheritance
-
ErrorDetails
- Attributes
- 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(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. |
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(SerializationInfo, StreamingContext) |
Initializes a new instance of the ErrorDetails class using data serialized via ISerializable |
ErrorDetails(String) |
Creates an instance of ErrorDetails specifying a Message. |
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() |