ExternalException Constructeurs

Définition

Initialise une nouvelle instance de la classe ExternalException.

Surcharges

ExternalException()

Initialise une nouvelle instance de la classe ExternalException avec des propriétés par défaut.

ExternalException(String)

Initialise une nouvelle instance de la classe ExternalException avec un message d'erreur spécifié.

ExternalException(SerializationInfo, StreamingContext)
Obsolète.

Initialise une nouvelle instance de la classe ExternalException à partir de données de sérialisation.

ExternalException(String, Exception)

Initialise une nouvelle instance de la classe ExternalException avec un message d'erreur spécifié et une référence à l'exception interne ayant provoqué cette exception.

ExternalException(String, Int32)

Initialise une nouvelle instance de la classe ExternalException avec un message d'erreur spécifié et le HRESULT de l'erreur.

ExternalException()

Source:
ExternalException.cs
Source:
ExternalException.cs
Source:
ExternalException.cs

Initialise une nouvelle instance de la classe ExternalException avec des propriétés par défaut.

public:
 ExternalException();
public ExternalException ();
Public Sub New ()

Remarques

Le tableau suivant affiche les valeurs de propriété initiales pour une instance de ExternalException.

Propriété Valeur
InnerException Référence Null (Nothing en Visual Basic).
Message Chaîne de message d’erreur localisée.

S’applique à

ExternalException(String)

Source:
ExternalException.cs
Source:
ExternalException.cs
Source:
ExternalException.cs

Initialise une nouvelle instance de la classe ExternalException avec un message d'erreur spécifié.

public:
 ExternalException(System::String ^ message);
public ExternalException (string? message);
public ExternalException (string message);
new System.Runtime.InteropServices.ExternalException : string -> System.Runtime.InteropServices.ExternalException
Public Sub New (message As String)

Paramètres

message
String

Message d'erreur qui spécifie la raison de l'exception.

Remarques

Le tableau suivant affiche les valeurs de propriété initiales pour une instance de ExternalException.

Propriété Valeur
InnerException Référence Null (Nothing en Visual Basic).
Message Chaîne du message d'erreur.

S’applique à

ExternalException(SerializationInfo, StreamingContext)

Source:
ExternalException.cs
Source:
ExternalException.cs
Source:
ExternalException.cs

Attention

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

Initialise une nouvelle instance de la classe ExternalException à partir de données de sérialisation.

protected:
 ExternalException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected ExternalException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected ExternalException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Runtime.InteropServices.ExternalException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Runtime.InteropServices.ExternalException
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Runtime.InteropServices.ExternalException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Runtime.InteropServices.ExternalException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Paramètres

info
SerializationInfo

Objet qui contient les données sérialisées de l'objet.

context
StreamingContext

Informations contextuelles sur la source ou la destination.

Attributs

Exceptions

info a la valeur null.

Remarques

Ce constructeur est appelé lors de la désérialisation afin de reconstituer l'objet exception transmis sur un flux. Pour plus d’informations, consultez Sérialisation XML et SOAP.

S’applique à

ExternalException(String, Exception)

Source:
ExternalException.cs
Source:
ExternalException.cs
Source:
ExternalException.cs

Initialise une nouvelle instance de la classe ExternalException avec un message d'erreur spécifié et une référence à l'exception interne ayant provoqué cette exception.

public:
 ExternalException(System::String ^ message, Exception ^ inner);
public ExternalException (string? message, Exception? inner);
public ExternalException (string message, Exception inner);
new System.Runtime.InteropServices.ExternalException : string * Exception -> System.Runtime.InteropServices.ExternalException
Public Sub New (message As String, inner As Exception)

Paramètres

message
String

Message d'erreur qui explique la raison de l'exception.

inner
Exception

Exception ayant provoqué l'exception actuelle. Si le paramètre inner n'est pas null, l'exception actuelle est levée dans un bloc catch qui gère l'exception interne.

Remarques

Une exception levée en conséquence directe d'une exception précédente doit contenir une référence à celle-ci dans la propriété InnerException. La propriété InnerException retourne la valeur passée au constructeur ou la valeur null si la propriété InnerException ne fournit pas la valeur d'exception interne au constructeur.

Le tableau suivant affiche les valeurs de propriété initiales pour une instance de ExternalException.

Propriété Value
InnerException La référence à l'exception interne.
Message Chaîne du message d'erreur.

Voir aussi

S’applique à

ExternalException(String, Int32)

Source:
ExternalException.cs
Source:
ExternalException.cs
Source:
ExternalException.cs

Initialise une nouvelle instance de la classe ExternalException avec un message d'erreur spécifié et le HRESULT de l'erreur.

public:
 ExternalException(System::String ^ message, int errorCode);
public ExternalException (string? message, int errorCode);
public ExternalException (string message, int errorCode);
new System.Runtime.InteropServices.ExternalException : string * int -> System.Runtime.InteropServices.ExternalException
Public Sub New (message As String, errorCode As Integer)

Paramètres

message
String

Message d'erreur qui spécifie la raison de l'exception.

errorCode
Int32

HRESULT de l'erreur.

Remarques

Le tableau suivant affiche les valeurs de propriété initiales pour une instance de ExternalException.

Propriété Valeur
ErrorCode HRESULT de l'erreur.
InnerException Référence Null (Nothing en Visual Basic).
Message Chaîne du message d'erreur.

S’applique à