Skip to content

Conversation

@pearmini
Copy link
Collaborator

@pearmini pearmini commented Oct 12, 2025

  • Before it stops running the notebook and displays error messages at the top of the notebook.
  • Now it only stops invalid block and displays error messages at the top of the current block.
image

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 12, 2025

Deploying recho with  Cloudflare Pages  Cloudflare Pages

Latest commit: 92c5dde
Status: ✅  Deploy successful!
Preview URL: https://80b50fe5.recho.pages.dev
Branch Preview URL: https://optimize-syntax-error-ob.recho.pages.dev

View logs

@pearmini pearmini requested a review from Copilot October 12, 2025 03:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves error handling in the observable transpile function by changing from a global error approach to a block-level error approach. Instead of stopping the entire notebook when a syntax error occurs, it now continues running other blocks and displays error messages at the block level.

  • Removed global syntax error tracking and early termination logic
  • Modified error handling to store syntax errors at the block level and continue processing
  • Updated observer to prioritize syntax errors over runtime errors in error display

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
runtime/index.js Updated error handling logic to support block-level error reporting instead of global notebook termination
test/js/syntax-error2.js Modified test case to use multi-line format with additional executable code
test/output/syntaxError2.js Updated expected test output to reflect new block-level error handling behavior

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@pearmini pearmini merged commit 910a11b into main Oct 12, 2025
2 checks passed
@pearmini pearmini deleted the optimize-syntax-error-ob branch October 12, 2025 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants