Skip to content

Support for Error Cause #41

@petamoriken

Description

@petamoriken

Pony Cause (Error Cause ponyfill) has stackWithCauses function that generate a stack trace string with cause errors. Make sense to add function like System.getStackStringWithCauses.

Error: something really bad happened here: something bad happened
    at Object.<anonymous> (/examples/fullStack.js:5:12)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)
    at node.js:968:3
caused by: Error: something bad happened
    at Object.<anonymous> (/examples/fullStack.js:3:12)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)
    at node.js:968:3

This feature has nothing to do with compatibility, which is the motivation for this proposal, so it may be better to proceed as a separate proposal. However, I thought it was worth having this issue here for discussion.

related: #22, tc39/proposal-error-cause#16, tc39/proposal-error-cause#41

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions