A newer version of this page is available. Switch to the current version.

ExceptionEventArgs.Exception Property

Gets the exception that caused the event.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v19.1.dll


public Exception Exception { get; }

Property Value

Type Description

A Exception object representing the exception that caused the event.


If the event handled is raised manually using validation events, the Exception parameter initially contains an internal exception object identifying the error that occurred. If the event has been raised as the result of violating databaser restrictions, the Exception parameter enables you to identify the violation. You can check the parameter type to determine the error. If you intend to display an error message box by setting the ExceptionEventArgs.ExceptionMode property to ExceptionMode.DisplayError, you can use the Exception property to obtain the exception description and construct a more meaningful error message. If you set the ExceptionEventArgs.ExceptionMode property to ExceptionMode.ThrowException, the exception specified by the Exception property will be thrown.

See Also