Skip to content

fix: convert last 2 codegen throws to clean error messages#196

Merged
cs01 merged 1 commit intomainfrom
fix/last-codegen-throws
Mar 10, 2026
Merged

fix: convert last 2 codegen throws to clean error messages#196
cs01 merged 1 commit intomainfrom
fix/last-codegen-throws

Conversation

@cs01
Copy link
Copy Markdown
Owner

@cs01 cs01 commented Mar 10, 2026

Summary

  • The last 2 throw new Error in codegen now produce clean error messages instead of Node.js stack traces
  • Users hitting unknown/any parameter types or closure scope errors now see a single-line error message

Changes

  • type-system.ts: any/unknown parameter type error → console.error + process.exit(1)
  • closure-analyzer.ts: Variable not found in closure scope → console.log + process.exit(1)

Test plan

  • All 453 tests pass (node + native)
  • Self-hosting Stage 0 + Stage 1 pass
  • should reject unknown type in function parameters test still passes

@cs01 cs01 merged commit 243e674 into main Mar 10, 2026
12 checks passed
@cs01 cs01 deleted the fix/last-codegen-throws branch March 10, 2026 23:19
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.

1 participant