ProcessStartPolicy.ProcessStartFailedExceptionEventArgs.Throw Property
Gets or sets whether to throw an exception.
Namespace: DevExpress.Data.Utils
Assembly: DevExpress.Data.Desktop.v24.1.dll
NuGet Packages: DevExpress.Data.Desktop, DevExpress.ExpressApp.Win.Design
Declaration
Property Value
Type | Description |
---|---|
Boolean | true to throw an exception; otherwise, false. |
Remarks
The following example demonstrates how to suppress an internal exception and display a message box:
static void Main() {
DevExpress.Data.Utils.ProcessStartPolicy.Failed += ProcessStartPolicy_Failed;
//...
}
private static void ProcessStartPolicy_Failed(object sender, DevExpress.Data.Utils.ProcessStartPolicy.ProcessStartFailedExceptionEventArgs e) {
if(e.Exception is Win32Exception) {
System.Diagnostics.ProcessStartInfo si = sender as System.Diagnostics.ProcessStartInfo;
e.Throw = false;
MessageBox.Show("File not found: " + si.FileName);
}
}
See Also