You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#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).
Problem
#57 tracks try/catch/finally lowering, but
throwand built-inExceptionare not usable in app code today. Web apps need throwable errors for validation and HTTP error paths (complements #152 serve 500 mapping).Goal
works in VM; catchable when #57 lands.
Tasks
PHPCfg\Op\Expr\Throw_to opcode(s) inlib/Compiler.phpExceptionclass (message, code, file, line) — VM object modelbin/serve.phpHTTP 500 (Web: Map uncaught exceptions to HTTP 500 in serve driver #152)Acceptance criteria
Caught exception returns 200 with body; uncaught in serve returns 500 (with
PHP_COMPILER_DEBUG).Dependencies
Exception::getMessage)Files
lib/Compiler.php,lib/VM.php,lib/OpCode.php,test/compliance/