From 3fcfd4ea14cf816d2f1df6977274ba9b825628fb Mon Sep 17 00:00:00 2001 From: "U-CAD\\userC" Date: Mon, 29 Nov 2021 16:50:17 +0100 Subject: [PATCH] adding a message before loading the plugin with a try except --- AnnularChecker/__init__.py | 8 ++++++-- AnnularChecker/annular_checker.py | 2 +- FabricationPositions/__init__.py | 8 ++++++-- FabricationPositions/fabrication_positions.py | 2 +- MoveToLayer/__init__.py | 8 ++++++-- MoveToLayer/move_to_layer.py | 2 +- PcbToDxf/__init__.py | 8 ++++++-- PcbToDxf/action_menu_pcb2dxf.py | 2 +- Snap2Grid/__init__.py | 8 ++++++-- Snap2Grid/snap2grid.py | 2 +- checking3Dmodels/__init__.py | 8 ++++++-- checking3Dmodels/model3d_list.py | 2 +- 12 files changed, 42 insertions(+), 18 deletions(-) diff --git a/AnnularChecker/__init__.py b/AnnularChecker/__init__.py index 7caa4ab..b6c0524 100644 --- a/AnnularChecker/__init__.py +++ b/AnnularChecker/__init__.py @@ -1,2 +1,6 @@ -from .annular_checker import annular_check -annular_check().register() +import wx +try: + from .annular_checker import annular_check + annular_check().register() +except Exception as e: + wx.LogMessage('annular checker plugin error\n'+str(e)) diff --git a/AnnularChecker/annular_checker.py b/AnnularChecker/annular_checker.py index a539ecd..6664e25 100644 --- a/AnnularChecker/annular_checker.py +++ b/AnnularChecker/annular_checker.py @@ -15,7 +15,7 @@ global mm_ius, DRL_EXTRA, AR_SET, AR_SET_V, DRL_EXTRA_ius, MIN_AR_SIZE, MIN_AR_SIZE_V, found_violations, LogMsg, ___version___ -___version___="1.7.1" +___version___="1.7.2" #wx.LogMessage("My message") mm_ius = 1000000.0 diff --git a/FabricationPositions/__init__.py b/FabricationPositions/__init__.py index 2b343d1..95835b4 100644 --- a/FabricationPositions/__init__.py +++ b/FabricationPositions/__init__.py @@ -1,2 +1,6 @@ -from .fabrication_positions import generatePOS -generatePOS().register() +import wx +try: + from .fabrication_positions import generatePOS + generatePOS().register() +except Exception as e: + wx.LogMessage('fabrication positions plugin error\n'+str(e)) diff --git a/FabricationPositions/fabrication_positions.py b/FabricationPositions/fabrication_positions.py index 1454cc0..2f3ca48 100644 --- a/FabricationPositions/fabrication_positions.py +++ b/FabricationPositions/fabrication_positions.py @@ -13,7 +13,7 @@ #pcbnew.GetWizardsBackTrace() -___version___="1.2.7" +___version___="1.2.8" #wx.LogMessage("My message") #mm_ius = 1000000.0 diff --git a/MoveToLayer/__init__.py b/MoveToLayer/__init__.py index fd5fc58..b50a7d4 100644 --- a/MoveToLayer/__init__.py +++ b/MoveToLayer/__init__.py @@ -1,2 +1,6 @@ -from .move_to_layer import move_to_draw_layer -move_to_draw_layer().register() +import wx +try: + from .move_to_layer import move_to_draw_layer + move_to_draw_layer().register() +except Exception as e: + wx.LogMessage('move to layer plugin error\n'+str(e)) diff --git a/MoveToLayer/move_to_layer.py b/MoveToLayer/move_to_layer.py index fb48dd6..d906cc8 100644 --- a/MoveToLayer/move_to_layer.py +++ b/MoveToLayer/move_to_layer.py @@ -30,7 +30,7 @@ import base64 from wx.lib.embeddedimage import PyEmbeddedImage import os -___version___="1.2.4" +___version___="1.2.5" from . import Move2LayerDlg diff --git a/PcbToDxf/__init__.py b/PcbToDxf/__init__.py index 68def39..2cd6e22 100644 --- a/PcbToDxf/__init__.py +++ b/PcbToDxf/__init__.py @@ -1,2 +1,6 @@ -from .action_menu_pcb2dxf import pcb2dxf -pcb2dxf().register() +import wx +try: + from .action_menu_pcb2dxf import pcb2dxf + pcb2dxf().register() +except Exception as e: + wx.LogMessage('pcb to dxf plugin error\n'+str(e)) diff --git a/PcbToDxf/action_menu_pcb2dxf.py b/PcbToDxf/action_menu_pcb2dxf.py index efdc855..8818aa5 100644 --- a/PcbToDxf/action_menu_pcb2dxf.py +++ b/PcbToDxf/action_menu_pcb2dxf.py @@ -32,7 +32,7 @@ script_name="kicadpcb2dxf" __author_script__="easyw Maurice" -___version___="3.8.2" +___version___="3.8.3" from contextlib import contextmanager diff --git a/Snap2Grid/__init__.py b/Snap2Grid/__init__.py index 07cb020..4cb730a 100644 --- a/Snap2Grid/__init__.py +++ b/Snap2Grid/__init__.py @@ -1,2 +1,6 @@ -from .snap2grid import snap_to_grid -snap_to_grid().register() +import wx +try: + from .snap2grid import snap_to_grid + snap_to_grid().register() +except Exception as e: + wx.LogMessage('snap to grid plugin error\n'+str(e)) diff --git a/Snap2Grid/snap2grid.py b/Snap2Grid/snap2grid.py index 056c230..556d634 100644 --- a/Snap2Grid/snap2grid.py +++ b/Snap2Grid/snap2grid.py @@ -11,7 +11,7 @@ ### plugins errors #import pcbnew;pcbnew.GetWizardsBackTrace() -__version__ = '1.2.1' +__version__ = '1.2.2' import sys, os import pcbnew import datetime diff --git a/checking3Dmodels/__init__.py b/checking3Dmodels/__init__.py index e28574c..c100273 100644 --- a/checking3Dmodels/__init__.py +++ b/checking3Dmodels/__init__.py @@ -1,2 +1,6 @@ -from .model3d_list import checkMissing3DM -checkMissing3DM().register() +import wx +try: + from .model3d_list import checkMissing3DM + checkMissing3DM().register() +except Exception as e: + wx.LogMessage('3D missing models checker plugin error\n'+str(e)) diff --git a/checking3Dmodels/model3d_list.py b/checking3Dmodels/model3d_list.py index 3a64c23..b1be1f9 100644 --- a/checking3Dmodels/model3d_list.py +++ b/checking3Dmodels/model3d_list.py @@ -15,7 +15,7 @@ #pcbnew.GetWizardsBackTrace() -___version___="1.1.3" +___version___="1.1.4" #wx.LogMessage("My message") #mm_ius = 1000000.0