mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-10-08 23:22:33 -04:00
fix(ui): report capture failures in the Plan Cutting dialog
Capturing plates runs inside the dialog's message loop, where only argument, operation and not-supported exceptions were caught, so any other capture failure escaped to the editor. Show every capture failure in the summary with Apply disabled instead.
This commit is contained in:
1 parent
1b422ef99a
commit
65d320d2e5
1 file changed
+2
-1
@@ -165,8 +165,9 @@ public partial class CuttingPlanForm : Form
|
||||
{
|
||||
batch = CuttingPlanBatch.Capture(plates, parameters, keepOrderCheckBox.Checked, plateNumbers);
|
||||
}
|
||||
catch (Exception ex) when (ex is ArgumentException or InvalidOperationException or NotSupportedException)
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Capture runs inside the dialog's message loop: report a failure, never crash the editor.
|
||||
ShowMessage($"Unable to start planning: {ex.Message}");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user