Skip to content

Comments

fix console.log(error) should include stack trace#40

Open
ammarahm-ed wants to merge 2 commits intomainfrom
fix-error-console-log
Open

fix console.log(error) should include stack trace#40
ammarahm-ed wants to merge 2 commits intomainfrom
fix-error-console-log

Conversation

@ammarahm-ed
Copy link
Collaborator

Closes #38

Copilot AI review requested due to automatic review settings February 20, 2026 06:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes issue #38 by modifying the console logging behavior to include stack traces when logging Error objects, matching Node.js behavior.

Changes:

  • Modified the transformJSObject function in Console.cpp to detect Error objects and append their stack traces
  • Added logic to check if an object is an error using napi_is_error and retrieve its stack property

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

when logging Error, also log stack

1 participant