Skip to content

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

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

Add console.exception() as alias for console.error()#5425
mmustafasenoglu wants to merge 1 commit 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
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

1 participant