diff --git a/pcbmode/utils/component.py b/pcbmode/utils/component.py index 5c05081f..ecc62a6e 100644 --- a/pcbmode/utils/component.py +++ b/pcbmode/utils/component.py @@ -53,7 +53,10 @@ def __init__(self, refdef, component): footprint_dict = None for path in paths: if os.path.isfile(path): - footprint_dict = dictFromJsonFile(path) + try: + footprint_dict = dictFromJsonFile(path) + except: + msg.error("Cannot parse JSON at file %s." % path) break if footprint_dict == None: