diff --git a/ExportDXF/Services/PartExporter.cs b/ExportDXF/Services/PartExporter.cs index 789e9bf..40df580 100644 --- a/ExportDXF/Services/PartExporter.cs +++ b/ExportDXF/Services/PartExporter.cs @@ -234,7 +234,7 @@ namespace ExportDXF.Services var drawingModel = templateDrawing as ModelDoc2; drawingModel.SaveAs(savePath); - AddEtchLines(savePath); + AddEtchLines(savePath, context); context.ProgressCallback?.Invoke($"Saved to \"{savePath}\"", LogLevel.Info, partTitle); @@ -301,7 +301,7 @@ namespace ExportDXF.Services drawing.DeleteSelection(false); } - private void AddEtchLines(string dxfPath) + private void AddEtchLines(string dxfPath, ExportContext context) { try { @@ -309,9 +309,9 @@ namespace ExportDXF.Services etcher.AddEtchLines(dxfPath); FixDegreeSymbol(dxfPath); } - catch (Exception) + catch (Exception ex) { - // Silently fail if etch lines can't be added + context.ProgressCallback?.Invoke($"Etch lines failed: {ex.Message}", LogLevel.Warning, Path.GetFileName(dxfPath)); } }