Back to Devexpress

ExceptionEventArgs.Exception Property

windowsforms-devexpress-dot-xtraeditors-dot-controls-dot-exceptioneventargs-1af21317.md

latest2.4 KB
Original Source

ExceptionEventArgs.Exception Property

Gets the exception that caused the event.

Namespace : DevExpress.XtraEditors.Controls

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public Exception Exception { get; }
vb
Public ReadOnly Property Exception As Exception

Property Value

TypeDescription
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

ExceptionMode

ExceptionEventArgs Class

ExceptionEventArgs Members

DevExpress.XtraEditors.Controls Namespace