Skip to content

Handle defined but not implemented Symbol.for #251

@maxfortun

Description

@maxfortun

Symbol.for is defined but not implemented in NGINX njs plugin and throws exception.

err InternalError: not implemented
at Symbol.for (native)

http://hg.nginx.org/njs/file/default/src/njs_symbol.c#l174

Suggestion for

bn.js/lib/bn.js

Line 373 in 5707aed

BN.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect;

Wrap in try/catch block and revert to BN.prototype.inspect = inspect; on error.

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