feat: print message in dump_error#249
Closed
henrydf wants to merge 1 commit intoquickjs-ng:masterfrom
Closed
Conversation
Contributor
|
Can you show a sample output? I'd imagine the previous dump of the excetion object would dump |
Contributor
Author
|
without this commit, it will be [exception]
put_char @ qjs_wasm.js:1592
write @ qjs_wasm.js:1538
write @ qjs_wasm.js:3261
doWritev @ qjs_wasm.js:5074
_fd_write @ qjs_wasm.js:5088
$__stdio_write @ __stdio_write.c:17
$__vfprintf_internal @ vfprintf.c:746
$vfprintf @ vfprintf.c:761
$fprintf @ fprintf.c:10
$js_dump_obj @ quickjs-libc.c:3863
$js_std_dump_error1 @ quickjs-libc.c:3873
$js_std_dump_error @ quickjs-libc.c:3894
$eval_buf @ qjs-shell.c:66
$initQuickJs @ qjs-shell.c:312
$runScript @ qjs-shell.c:360
(anonymous) @ qjs_wasm.js:715
ccall @ qjs_wasm.js:5186
(anonymous) @ build/:12 |
Contributor
Author
|
otherwise, it will be: stack overflow
put_char @ qjs_wasm.js:1592
write @ qjs_wasm.js:1538
write @ qjs_wasm.js:3261
doWritev @ qjs_wasm.js:5074
_fd_write @ qjs_wasm.js:5088
$__stdio_write @ __stdio_write.c:17
$__vfprintf_internal @ vfprintf.c:746
$vfprintf @ vfprintf.c:761
$fprintf @ fprintf.c:10
$js_dump_obj @ quickjs-libc.c:3860
$js_std_dump_error1 @ quickjs-libc.c:3877
$js_std_dump_error @ quickjs-libc.c:3894
$eval_buf @ qjs-shell.c:66
$initQuickJs @ qjs-shell.c:312
$runScript @ qjs-shell.c:360
(anonymous) @ qjs_wasm.js:715
ccall @ qjs_wasm.js:5186
(anonymous) @ build/:12 |
Contributor
|
What about a different type of error like a ReferenceError ? |
Contributor
Author
|
In my opinion, message of error instance, is usefull for debug. |
Contributor
|
That's not what I asked :-) Can you show an output example with a ReferenceError for example? |
Contributor
Author
|
work is busy, i am not sure what your exactly asked. any ReferenceError without this commit in QuickJs? or something else... |
Contributor
|
YEs, an example of a ReferenceError after the change please. |
Contributor
cuiweixie
pushed a commit
to cuiweixie/quickjs
that referenced
this pull request
Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sometimes error.messsage is the key point of debug.
for example,
met a stack overflow before any user code has been executed.