Sitelet https://github.com/nodejs/node/issues/36770
Skip to content

process 'error' event is undocumented #36770

Description

@addaleax

process.emit('error', err, event);
/cc @benjamingr

Activity

  1. added
    docIssues and PRs related to Node.js documentation.
    eventtargetIssues and PRs related to the EventTarget implementation.
    on Jan 4, 2021
  2. benjamingr commented on Jan 4, 2021

    @benjamingr
    Member

    I wonder if we want to keep it or emit uncaughtException directly since no-one actually complained about this or asked for this since EventEmitter was added.

    We can also just doc it.

  3. benjamingr commented on Jan 4, 2021

    @benjamingr
    Member

    Any strong opinions?

  4. addaleax commented on Jan 4, 2021

    @addaleax
    MemberAuthor

    I was definitely caught by surprise by this being added, and would be happy to treat it as uncaught exceptions (i.e. act as if there’s no 'error' listener present).

  5. jasnell commented on Jan 4, 2021

    @jasnell
    Member
  6. addaleax commented on Jan 4, 2021

    @addaleax
    MemberAuthor

    https://nodejs.org/api/process.html#process_process_events is missing them – we always document events on the emitter.

  7. benjamingr commented on Jan 5, 2021

    @benjamingr
    Member

    @jasnell any strong opinions about making this an uncaughtException? I'm happy to make a PR.

  8. jasnell commented on Jan 6, 2021

    @jasnell
    Member

    About making what an uncaughtException? Sorry, it's not clear

  9. addaleax commented on Jan 7, 2021

    @addaleax
    MemberAuthor

    @jasnell About making an exception inside a EventTarget event handler be treated like an uncaught exception, i.e. trigger the uncaughtException listener if there is one and otherwise exit the process with error code 1.

  10. Linkgoron commented on Feb 4, 2021

    @Linkgoron
    Contributor

    I'll try taking a stab at this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to Node.js documentation.eventtargetIssues and PRs related to the EventTarget implementation.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions