Skip to content

qjs/std should report async failures via exit code #340

@bnoordhuis

Description

@bnoordhuis

Example: assert triggered from timer callback should exit with a non-zero error but doesn't. quickjs-libc.c calls js_std_dump_error() and trucks on.

$ build/qjs tests/test_std.js
Error: assertion failed: got |false|, expected |true|
    at assert (tests/test_std.js:21:51)
    at d (tests/test_std.js:287:33)

$ echo $?
0

Originally posted by @saghul in #338 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions