Skip to content

new Error().stack is an Array #3767

@lauriro

Description

@lauriro

Although Error#stack is a non-standard property,
it would be nice to follow other implementations
and return a String instead of Array.

var err = new Error("Er")
print(typeof err.stack, Array.isArray(err.stack))
// node returns: string false
// jerry returns: object true

Just message + stack joined with newline would be enough as all stack using libraries does expect different format on different environments.

Linux
commit bbb5c91
python tools/build.py --line-info=ON

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions