ExternalException Classe
Définition
Type d'exception de base pour toutes les exceptions COM Interop et les exceptions SEH (Structured Exception Handling).The base exception type for all COM interop exceptions and structured exception handling (SEH) exceptions.
public ref class ExternalException : SystemException
public class ExternalException : SystemException
[System.Serializable]
public class ExternalException : SystemException
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public class ExternalException : SystemException
type ExternalException = class
inherit SystemException
[<System.Serializable>]
type ExternalException = class
inherit SystemException
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type ExternalException = class
inherit SystemException
Public Class ExternalException
Inherits SystemException
- Héritage
- Dérivé
- Attributs
Remarques
Pour améliorer l’interopérabilité entre les systèmes hérités et les common language runtime, la ErrorCode propriété stocke une valeur entière (HRESULT) qui identifie l’erreur.To enhance interoperability between legacy systems and the common language runtime, the ErrorCode property stores an integer value (HRESULT) that identifies the error. Les exceptions définies par l’utilisateur ne doivent jamais dériver de ExternalException
, et une ExternalException
ne doit jamais être levée par le code utilisateur.User defined exceptions should never derive from ExternalException
, and an ExternalException
should never be thrown by user code. Utilisez à la place les exceptions spécifiques qui dérivent de ExternalException
.Use the specific exceptions that derive from ExternalException
instead.
ExternalException
utilise le HRESULT E_FAIL qui a la valeur 0x80004005.ExternalException
uses the HRESULT E_FAIL which has the value 0x80004005.
ExternalException
utilise l’implémentation par défaut Equals , qui prend en charge l’égalité des références.ExternalException
uses the default Equals implementation, which supports reference equality.
Pour obtenir la liste des valeurs initiales d’une instance de ExternalException
, consultez les ExternalException
constructeurs.For a list of initial values for an instance of ExternalException
, see the ExternalException
constructors.
Constructeurs
ExternalException() |
Initialise une nouvelle instance de la classe |
ExternalException(SerializationInfo, StreamingContext) |
Initialise une nouvelle instance de la classe |
ExternalException(String) |
Initialise une nouvelle instance de la classe |
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.Initializes a new instance of the ExternalException class with a specified error message and a reference to the inner exception that is the cause of this exception. |
ExternalException(String, Int32) |
Initialise une nouvelle instance de la classe |
Propriétés
Data |
Obtient une collection de paires clé/valeur qui fournissent des informations définies par l'utilisateur supplémentaires sur l'exception.Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Hérité de Exception) |
ErrorCode |
Obtient le |
HelpLink |
Obtient ou définit un lien vers le fichier d'aide associé à cette exception.Gets or sets a link to the help file associated with this exception. (Hérité de Exception) |
HResult |
Obtient ou définit HRESULT, valeur numérique codée qui est assignée à une exception spécifique.Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Hérité de Exception) |
InnerException |
Obtient l'instance Exception qui a provoqué l'exception actuelle.Gets the Exception instance that caused the current exception. (Hérité de Exception) |
Message |
Obtient un message qui décrit l'exception active.Gets a message that describes the current exception. (Hérité de Exception) |
Source |
Obtient ou définit le nom de l'application ou de l'objet qui est à l'origine de l'erreur.Gets or sets the name of the application or the object that causes the error. (Hérité de Exception) |
StackTrace |
Obtient une représentation sous forme de chaîne des frames immédiats sur la pile des appels.Gets a string representation of the immediate frames on the call stack. (Hérité de Exception) |
TargetSite |
Obtient la méthode qui lève l'exception actuelle.Gets the method that throws the current exception. (Hérité de Exception) |
Méthodes
Equals(Object) |
Détermine si l'objet spécifié est égal à l'objet actuel.Determines whether the specified object is equal to the current object. (Hérité de Object) |
GetBaseException() |
En cas de substitution dans une classe dérivée, retourne la Exception qui est à l'origine d'une ou de plusieurs exceptions ultérieures.When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (Hérité de Exception) |
GetHashCode() |
Fait office de fonction de hachage par défaut.Serves as the default hash function. (Hérité de Object) |
GetObjectData(SerializationInfo, StreamingContext) |
En cas de substitution dans une classe dérivée, définit SerializationInfo avec des informations sur l'exception.When overridden in a derived class, sets the SerializationInfo with information about the exception. (Hérité de Exception) |
GetType() |
Obtient le type au moment de l'exécution de l'instance actuelle.Gets the runtime type of the current instance. (Hérité de Exception) |
MemberwiseClone() |
Crée une copie superficielle du Object actuel.Creates a shallow copy of the current Object. (Hérité de Object) |
ToString() |
Retourne une chaîne qui contient le HRESULT de l'erreur.Returns a string that contains the HRESULT of the error. |
ToString() |
Crée et retourne une chaîne représentant l'exception actuelle.Creates and returns a string representation of the current exception. (Hérité de Exception) |
Événements
SerializeObjectState |
Se produit quand une exception est sérialisée pour créer un objet d'état d'exception qui contient des données sérialisées concernant l'exception.Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. (Hérité de Exception) |