Skip to content

Walk the cause chain when dumping uncaught errors - #1509

Merged
saghul merged 2 commits into
masterfrom
dump-error-cause-chain
May 25, 2026
Merged

saghul merged 2 commits into
masterfrom
dump-error-cause-chain

Conversation

@saghul

@saghul saghul commented May 22, 2026

Copy link
Copy Markdown
Contributor

Example:

var e = new Error('inner!');

throw new Error('outer!', { cause: e });
$ ./build/qjs t.js
Error: outer!
    at <anonymous> (t.js:3:11)

Caused by: Error: inner!
    at <anonymous> (t.js:1:12)

@bnoordhuis bnoordhuis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe it should preserve rt->current_exception? Apart from that LGTM.

@saghul

saghul commented May 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Maybe it should preserve rt->current_exception? Apart from that LGTM.

Goot point, pushed a fix that basically acts the way the previous code did with the stack property.

@saghul
saghul merged commit bb45624 into master May 25, 2026
124 checks passed
@saghul
saghul deleted the dump-error-cause-chain branch May 25, 2026 07:39
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
quickjs-ng 0.15.1

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>## What's Changed
* Add an option to print only version info by @mhogomchungu in quickjs-ng/quickjs#1507
* Walk the cause chain when dumping uncaught errors by @saghul in quickjs-ng/quickjs#1509
* Update projects.md by @qr243vbi in quickjs-ng/quickjs#1514
* Actually enable mimalloc in the CMake CLI build by @saghul in quickjs-ng/quickjs#1519
* reject growable SharedArrayBuffer without hooks by @jdcaperon in quickjs-ng/quickjs#1523

## New Contributors
* @mhogomchungu made their first contribution in quickjs-ng/quickjs#1507
* @jdcaperon made their first contribution in quickjs-ng/quickjs#1523

**Full Changelog**: https://github.com/quickjs-ng/quickjs/compare/v0.15.0...v0.15.1</pre>
  <p>View the full release notes at <a href="https://github.com/quickjs-ng/quickjs/releases/tag/v0.15.1">https://github.com/quickjs-ng/quickjs/releases/tag/v0.15.1</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!10565
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.

2 participants