Skip to main content

ExceptionEventArgs.Exception Property

Gets the exception that caused the event.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v23.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public Exception Exception { get; }

Property Value

Type Description
Exception

A Exception object representing the exception that caused the event.

Remarks

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