Skip to content

Understanding add backtrace condition? #782

@richarddd

Description

@richarddd

Hey,

I'm having a hard time trying to understand this condition:
https://github.com/quickjs-ng/quickjs/blob/master/quickjs.c#L6862-L6865

The issue I'm facing is calling this from a non-bytecode function (in c or Rust) results in missing stack trace.
From rust we call:

let res = qjs::JS_ThrowTypeError(
                ctx.as_ptr(),
                ERROR_FORMAT_STR.as_ptr(),
                buffer.as_ptr().cast::<*mut u8>(),
            );

And later

qjs::JS_GetException(self.ctx.as_ptr());

When do we don't want to capture backtraces?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions