concerto icon indicating copy to clipboard operation
concerto copied to clipboard

fix(parser): collect errors without halting and include file IDs

Open fuyalasmit opened this issue 9 months ago • 2 comments

Closes #999

Improves error handling in parseModels to collect all errors and include file identifiers.

Changes

  • Modified parseModels to collect errors in an array instead of throwing immediately
  • Added file identifiers (file_${index} or explicit fileName) to error messages

Flags

  • File Identification:
    Errors use generated file_${index} IDs (e.g., file_1) instead of actual filenames.
    This is because the input files array may contain raw CTO strings (legacy) without filenames.

Author Checklist

  • [x] Ensure you provide a DCO sign-off for your commits using the --signoff option 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 main from fuyal:asmit/999

fuyalasmit avatar Mar 22 '25 02:03 fuyalasmit

@mttrbrts can you please review this ?

fuyalasmit avatar Mar 22 '25 16:03 fuyalasmit

made all the required changes, kindly review once.

fuyalasmit avatar Apr 02 '25 06:04 fuyalasmit

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.

fuyalasmit avatar Apr 13 '25 16:04 fuyalasmit

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.

github-actions[bot] avatar May 01 '25 02:05 github-actions[bot]

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.

github-actions[bot] avatar May 18 '25 02:05 github-actions[bot]