fix(parser): collect errors without halting and include file IDs
Closes #999
Improves error handling in parseModels to collect all errors and include file identifiers.
Changes
- Modified
parseModelsto collect errors in an array instead of throwing immediately - Added file identifiers (
file_${index}or explicitfileName) to error messages
Flags
-
File Identification:
Errors use generatedfile_${index}IDs (e.g.,file_1) instead of actual filenames.
This is because the inputfilesarray may contain raw CTO strings (legacy) without filenames.
Author Checklist
- [x] Ensure you provide a DCO sign-off for your commits using the
--signoffoption of git commit. - [x] Vital features and changes captured in unit and/or integration tests
- [x] Commits messages follow AP format
- [x] Extend the documentation, if necessary
- [x] Merging to
mainfromfuyal:asmit/999
@mttrbrts can you please review this ?
made all the required changes, kindly review once.
Thanks @fuyalasmit. I just made one final suggestion to better format the output messages.
In future, it would be helpful to extend the signature of the parseModels function to allow a client application to pass in real file names (such as in the Concerto CLI).
Passing the real name would be a good idea to be implemented in future. Thank you for the suggestion, I have committed the changes. PR should be good to go.
This PR is stale because it has been open 15 days with no activity. Remove stale label or comment or this will be closed in 10 days.
This PR is stale because it has been open 15 days with no activity. Remove stale label or comment or this will be closed in 10 days.