Skip to content

Language: throw expressions and Exception object propagation #195

@PurHur

Description

@PurHur

Problem

#57 tracks try/catch/finally lowering, but throw and built-in Exception are not usable in app code today. Web apps need throwable errors for validation and HTTP error paths (complements #152 serve 500 mapping).

Goal

throw new Exception('Invalid input');

works in VM; catchable when #57 lands.

Tasks

Acceptance criteria

Caught exception returns 200 with body; uncaught in serve returns 500 (with PHP_COMPILER_DEBUG).

Dependencies

Files

  • lib/Compiler.php, lib/VM.php, lib/OpCode.php, test/compliance/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions