Fixed missing argument in "Missing sub-sheet name" error

This commit is contained in:
SET 2020-08-14 18:58:34 -03:00
parent c15e971da2
commit a237865787
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ KiCad v5 (and older) Schematic format.
A basic implementation of the .sch file format.
"""
# Encapsulate file/line
import re
import os
from collections import OrderedDict
@ -976,7 +977,7 @@ class SchematicSheet(object):
sch.labels.append(SchematicPort.parse(line[1:]))
line = _get_line(f)
if not sch.name:
raise SchFileError('Missing sub-sheet name')
raise SchFileError('Missing sub-sheet name', 'pos: {},{}'.format(sch.x, sch.y))
if not sch.file:
raise SchFileError('Missing sub-sheet file name', sch.name)
return sch