adding try:except on processing pads to avoid crash
This commit is contained in:
@ -425,13 +425,15 @@ STEP = '-'
|
|||||||
|
|
||||||
for x in range(start_x, stop_x + 1):
|
for x in range(start_x, stop_x + 1):
|
||||||
for y in range(start_y, stop_y + 1):
|
for y in range(start_y, stop_y + 1):
|
||||||
if isinstance(rectangle[x][y], ViaObject):
|
try:
|
||||||
start_rect = wxPoint(origin.x + (l_clearance * x) - local_offset,
|
if isinstance(rectangle[x][y], ViaObject):
|
||||||
origin.y + (l_clearance * y) - local_offset)
|
start_rect = wxPoint(origin.x + (l_clearance * x) - local_offset,
|
||||||
size_rect = wxSize(2 * local_offset, 2 * local_offset)
|
origin.y + (l_clearance * y) - local_offset)
|
||||||
if pad.HitTest(EDA_RECT(start_rect, size_rect), False):
|
size_rect = wxSize(2 * local_offset, 2 * local_offset)
|
||||||
rectangle[x][y] = self.REASON_PAD
|
if pad.HitTest(EDA_RECT(start_rect, size_rect), False):
|
||||||
|
rectangle[x][y] = self.REASON_PAD
|
||||||
|
except:
|
||||||
|
wxPrint("exception on Processing all pads...")
|
||||||
if self.debug:
|
if self.debug:
|
||||||
wxPrint("\nPost pads:")
|
wxPrint("\nPost pads:")
|
||||||
self.PrintRect(rectangle)
|
self.PrintRect(rectangle)
|
||||||
|
Reference in New Issue
Block a user