mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 12:51:54 +00:00
Key changes to make ResolveMessage/BuildMessage proper ErrorInstance objects: 1. **Proper inheritance**: Classes with inheritsFromError:true now inherit from JSC::ErrorInstance instead of JSC::JSDestructibleObject 2. **Correct subspace allocation**: ErrorInstance classes use built-in error subspace instead of generating custom subspace methods 3. **Fixed constructor signatures**: ErrorInstance requires ErrorType::Error parameter in constructor 4. **Fixed finishCreation**: ErrorInstance requires message and cause parameters for proper initialization 5. **Set ErrorInstanceType**: JSType set to ErrorInstanceType for Error.isError() to return true 6. **Symbol property handling**: Fixed cached property generation to skip @@ symbol properties that cause C++ syntax errors This makes ResolveMessage objects proper Error instances that pass both Error.isError() and instanceof Error checks. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>