diff --git a/contracts.js b/contracts.js index ffabe85..31561a7 100644 --- a/contracts.js +++ b/contracts.js @@ -135,6 +135,7 @@ function extractContracts(filePath, relFile) { function extractAllContracts(subsystemMap, srcRoot) { const allContracts = []; const bySubsystem = {}; + const parseErrors = []; for (const sub of subsystemMap.subsystems) { bySubsystem[sub.name] = []; @@ -150,12 +151,12 @@ function extractAllContracts(subsystemMap, srcRoot) { allContracts.push(...contracts); bySubsystem[sub.name].push(...contracts); } catch (err) { - // Skip files that fail to parse + parseErrors.push({ file: relFile, error: err.message }); } } } - return { contracts: allContracts, bySubsystem }; + return { contracts: allContracts, bySubsystem, parseErrors }; } /**