Partager via


WindowsFormsApplicationBase.OnUnhandledException Méthode

Définition

En cas de substitution dans une classe dérivée, permet au code de s’exécuter lorsqu’une exception non gérée se produit dans l’application.

protected:
 virtual bool OnUnhandledException(Microsoft::VisualBasic::ApplicationServices::UnhandledExceptionEventArgs ^ e);
protected virtual bool OnUnhandledException(Microsoft.VisualBasic.ApplicationServices.UnhandledExceptionEventArgs e);
abstract member OnUnhandledException : Microsoft.VisualBasic.ApplicationServices.UnhandledExceptionEventArgs -> bool
override this.OnUnhandledException : Microsoft.VisualBasic.ApplicationServices.UnhandledExceptionEventArgs -> bool
Protected Overridable Function OnUnhandledException (e As UnhandledExceptionEventArgs) As Boolean

Paramètres

e
UnhandledExceptionEventArgs

Données de l’événement.

Retours

Indiquant Boolean si l’événement UnhandledException a été déclenché.

Remarques

Par défaut, cette méthode déclenche l’événement UnhandledException tant qu’un débogueur n’est pas attaché et que l’utilisateur gère l’événement UnhandledException . Le gestionnaire d’événements peut définir la ExitApplication propriété. Si ExitApplication c’est Falsele cas ou si l’événement n’est pas géré, l’application se ferme lors du retour du gestionnaire d’exceptions. Sinon, le contrôle de l’application est retourné à la boucle de message Windows Forms.

S’applique à

Voir aussi