Skip to content

Add throw and try/catch/finally support #3

@memburg

Description

@memburg

Goal

Add basic exception handling to GiavaScript.

Why

This enables safer application logic and controlled error recovery instead of only runtime-fatal behavior.

Scope

Implement support for:

  • throw
  • try { ... } catch (err) { ... }
  • try { ... } finally { ... }
  • try { ... } catch (err) { ... } finally { ... }

Plan

  • Extend parser and statement handling for try/catch/finally and throw.
  • Propagate thrown values through execution until caught.
  • Bind catch parameter in catch scope.
  • Add specs for normal flow, thrown errors, rethrow, and finally behavior.
  • Update language reference docs.

Out of Scope

  • Advanced engine-level stack traces in first pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions