Skip to content

Conversation

@bnoordhuis
Copy link
Contributor

Before this commit, such objects were printed as <exception> because print() and console.log() had no good way to turn them into strings.

Instead perform the C equivalent of Object.prototype.toString.call(o) and print the result (which can still error but at least we tried.)

Fixes: #832

Before this commit, such objects were printed as `<exception>` because
print() and console.log() had no good way to turn them into strings.

Instead perform the C equivalent of Object.prototype.toString.call(o)
and print the result (which can still error but at least we tried.)

Fixes: quickjs-ng#832
@bnoordhuis bnoordhuis merged commit d07f6b5 into quickjs-ng:master Jan 18, 2025
61 checks passed
@bnoordhuis bnoordhuis deleted the fix832 branch January 18, 2025 15:04
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.

import a c or js module and print it, show exception in quickjs

2 participants