ErrObject.GetException Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Retourne l’exception représentant l’erreur qui s’est produite.
public:
Exception ^ GetException();
public Exception GetException();
member this.GetException : unit -> Exception
Public Function GetException () As Exception
Retours
Exception représentant l’erreur qui s’est produite.
Exemples
Le code suivant affiche le message affecté à l’exception dans l’objet Err :
On Error Resume Next
Dim myError As System.Exception
' Generate an overflow exception.
Err.Raise(6)
' Assigns the exception from the Err object to myError.
myError = Err.GetException()
' Displays the message associated with the exception.
MsgBox(myError.Message)
Remarques
La GetException fonction est disponible uniquement à partir de la classe d’objets Err . Il fonctionne avec la Exception propriété de l’objet Err pour afficher l’erreur qui s’est produite.