Skip to content

v8pp throws strings by default, which is bad practice #205

@jcmonnin

Description

@jcmonnin

v8pp::throw_ex throws a string by default, which is considered a bad practice by many:

https://stackoverflow.com/questions/11502052/throwing-strings-instead-of-errors

In the application I'm working on, errors from user scripts are formatted in a standard way including stack traces, but it fails if the error is thrown within v8pp. The user is left without stack trace. For that reason I have a patch to default to throwing and Error instead of a string in v8pp.

Would this patch be welcome upstream?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions