Skip to content

Add console.exception() as alias for console.error()#5425

Open
mmustafasenoglu wants to merge 2 commits into
boa-dev:mainfrom
mmustafasenoglu:feat/console-exception-alias
Open

Add console.exception() as alias for console.error()#5425
mmustafasenoglu wants to merge 2 commits into
boa-dev:mainfrom
mmustafasenoglu:feat/console-exception-alias

Conversation

@mmustafasenoglu

Copy link
Copy Markdown

Summary

Adds console.exception() as an alias for console.error(), aligning with the WHATWG Console specification (console.spec.whatwg.org).

The spec defines console.exception() as identical to console.error() — same signature, behavior, and security considerations.

Changes

  • Registered console.exception in Console::make_console() as an alias for Self::error (same pattern as dirxmldir)
  • Added console_exception_is_alias_for_error test

Motivation

Closes #307 (partially — profile(), profileEnd(), timeStamp() are marked not_planned by maintainers).

console.exception() is widely supported in browser environments (Chrome, Firefox, Safari) and is commonly used to log errors with stack trace information.

WHATWG Console specification defines console.exception() as
identical to console.error(). This adds the alias registration
in Console::make_console() and a test to verify it works.

Closes boa-dev#307
@mmustafasenoglu mmustafasenoglu requested a review from a team as a code owner July 5, 2026 11:39
@github-actions github-actions Bot added C-Tests Issues and PRs related to the tests. C-Runtime Issues and PRs related to Boa's runtime features Waiting On Review Waiting on reviews from the maintainers labels Jul 5, 2026
@github-actions github-actions Bot added this to the v1.0.0 milestone Jul 5, 2026

@jedel1043 jedel1043 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for the contribution! Looks good to me.

@jedel1043 jedel1043 enabled auto-merge July 10, 2026 05:58
@github-actions

Copy link
Copy Markdown

Test262 conformance changes

Test result main count PR count difference
Total 53,125 53,125 0
Passed 51,072 51,072 0
Ignored 1,482 1,482 0
Failed 571 571 0
Panics 0 0 0
Conformance 96.14% 96.14% 0.00%

Tested main commit: 47eb20a239de0963aec4a6d619c30de48931ccc1
Tested PR commit: 5a5bf24ee3d6a685c628592d91d2548da633a960
Compare commits: 47eb20a...5a5bf24

auto-merge was automatically disabled July 11, 2026 08:31

Head branch was pushed to by a user without write access

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-Runtime Issues and PRs related to Boa's runtime features C-Tests Issues and PRs related to the tests. Waiting On Review Waiting on reviews from the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement console methods

2 participants