Skip to content

Refactor e2e parse result handling to use try/catch#69

Open
bobzhang wants to merge 1 commit into
mainfrom
codex/simplify-error-handling-code
Open

Refactor e2e parse result handling to use try/catch#69
bobzhang wants to merge 1 commit into
mainfrom
codex/simplify-error-handling-code

Conversation

@bobzhang

@bobzhang bobzhang commented Mar 28, 2026

Copy link
Copy Markdown
Collaborator

Motivation

  • Replace try? + match Ok/Err patterns with direct try ... catch to simplify control flow and make parse error handling explicit in e2e test helpers.

Description

  • Update run_single_valid_test and run_single_invalid_test in e2e/runner.mbt to wrap @toml.parse(...) with try ... catch while preserving existing mismatch and parse-error messages.
  • Update the valid-suite loop in e2e/e2e_test.mbt to use try ... catch around each parse and keep pass/fail counters and failure reporting unchanged.

Testing

  • Attempted to run moon fmt, but moon is not available in the environment (moon: command not found), so no automated formatting or moon-based tests were executed.

Codex Task


Open with Devin

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant