Merge pull request #511 from litghost/more_verbose_db_errors

Accumulate all missing features, rather than stopping on first failure.
This commit is contained in:
Karol Gugala 2019-01-15 18:23:33 +01:00 committed by GitHub
commit e7b5c4958a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -138,6 +138,7 @@ class FasmAssembler(object):
(gridinfo.tile_type, db_k, line))
def parse_fasm_filename(self, filename):
missing_features = []
for line in fasm.parse_fasm_filename(filename):
if not line.set_feature:
continue
@ -160,4 +161,10 @@ class FasmAssembler(object):
if flat_set_feature.start is not None:
address = flat_set_feature.start
self.enable_feature(tile, feature, address, line_str)
try:
self.enable_feature(tile, feature, address, line_str)
except FasmLookupError as e:
missing_features.append(str(e))
if missing_features:
raise FasmLookupError('\n'.join(missing_features))